forked from TrueCloudLab/restic
commit
13aae82635
2 changed files with 32 additions and 19 deletions
49
.github/workflows/tests.yml
vendored
49
.github/workflows/tests.yml
vendored
|
@ -8,6 +8,10 @@ on:
|
||||||
# run tests for all pull requests
|
# run tests for all pull requests
|
||||||
pull_request:
|
pull_request:
|
||||||
|
|
||||||
|
env:
|
||||||
|
latest_go: "1.18.x"
|
||||||
|
GO111MODULE: on
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
test:
|
test:
|
||||||
strategy:
|
strategy:
|
||||||
|
@ -15,35 +19,47 @@ jobs:
|
||||||
# list of jobs to run:
|
# list of jobs to run:
|
||||||
include:
|
include:
|
||||||
- job_name: Windows
|
- job_name: Windows
|
||||||
go: 1.17.x
|
go: 1.18.x
|
||||||
os: windows-latest
|
os: windows-latest
|
||||||
|
install_verb: install
|
||||||
|
|
||||||
- job_name: macOS
|
- job_name: macOS
|
||||||
go: 1.17.x
|
go: 1.18.x
|
||||||
os: macOS-latest
|
os: macOS-latest
|
||||||
test_fuse: false
|
test_fuse: false
|
||||||
|
install_verb: install
|
||||||
|
|
||||||
- job_name: Linux
|
- job_name: Linux
|
||||||
go: 1.17.x
|
go: 1.18.x
|
||||||
os: ubuntu-latest
|
os: ubuntu-latest
|
||||||
test_cloud_backends: true
|
test_cloud_backends: true
|
||||||
test_fuse: true
|
test_fuse: true
|
||||||
check_changelog: true
|
check_changelog: true
|
||||||
|
install_verb: install
|
||||||
|
|
||||||
|
- job_name: Linux
|
||||||
|
go: 1.17.x
|
||||||
|
os: ubuntu-latest
|
||||||
|
test_fuse: true
|
||||||
|
install_verb: install
|
||||||
|
|
||||||
- job_name: Linux
|
- job_name: Linux
|
||||||
go: 1.16.x
|
go: 1.16.x
|
||||||
os: ubuntu-latest
|
os: ubuntu-latest
|
||||||
test_fuse: true
|
test_fuse: true
|
||||||
|
install_verb: get
|
||||||
|
|
||||||
- job_name: Linux
|
- job_name: Linux
|
||||||
go: 1.15.x
|
go: 1.15.x
|
||||||
os: ubuntu-latest
|
os: ubuntu-latest
|
||||||
test_fuse: true
|
test_fuse: true
|
||||||
|
install_verb: get
|
||||||
|
|
||||||
- job_name: Linux
|
- job_name: Linux
|
||||||
go: 1.14.x
|
go: 1.14.x
|
||||||
os: ubuntu-latest
|
os: ubuntu-latest
|
||||||
test_fuse: true
|
test_fuse: true
|
||||||
|
install_verb: get
|
||||||
|
|
||||||
name: ${{ matrix.job_name }} Go ${{ matrix.go }}
|
name: ${{ matrix.job_name }} Go ${{ matrix.go }}
|
||||||
runs-on: ${{ matrix.os }}
|
runs-on: ${{ matrix.os }}
|
||||||
|
@ -60,7 +76,7 @@ jobs:
|
||||||
- name: Get programs (Linux/macOS)
|
- name: Get programs (Linux/macOS)
|
||||||
run: |
|
run: |
|
||||||
echo "build Go tools"
|
echo "build Go tools"
|
||||||
go get github.com/restic/rest-server/...
|
go ${{ matrix.install_verb }} github.com/restic/rest-server/cmd/rest-server@latest
|
||||||
|
|
||||||
echo "install minio server"
|
echo "install minio server"
|
||||||
mkdir $HOME/bin
|
mkdir $HOME/bin
|
||||||
|
@ -92,7 +108,7 @@ jobs:
|
||||||
$ProgressPreference = 'SilentlyContinue'
|
$ProgressPreference = 'SilentlyContinue'
|
||||||
|
|
||||||
echo "build Go tools"
|
echo "build Go tools"
|
||||||
go get github.com/restic/rest-server/...
|
go ${{ matrix.install_verb }} github.com/restic/rest-server/...
|
||||||
|
|
||||||
echo "install minio server"
|
echo "install minio server"
|
||||||
mkdir $Env:USERPROFILE/bin
|
mkdir $Env:USERPROFILE/bin
|
||||||
|
@ -182,7 +198,7 @@ jobs:
|
||||||
- name: Check changelog files with calens
|
- name: Check changelog files with calens
|
||||||
run: |
|
run: |
|
||||||
echo "install calens"
|
echo "install calens"
|
||||||
go get github.com/restic/calens
|
go install github.com/restic/calens@latest
|
||||||
|
|
||||||
echo "check changelog files"
|
echo "check changelog files"
|
||||||
calens
|
calens
|
||||||
|
@ -206,7 +222,6 @@ jobs:
|
||||||
solaris/amd64"
|
solaris/amd64"
|
||||||
|
|
||||||
env:
|
env:
|
||||||
go: 1.16.x
|
|
||||||
GOPROXY: https://proxy.golang.org
|
GOPROXY: https://proxy.golang.org
|
||||||
|
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
|
@ -214,17 +229,17 @@ jobs:
|
||||||
name: Cross Compile for ${{ matrix.targets }}
|
name: Cross Compile for ${{ matrix.targets }}
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- name: Set up Go ${{ env.go }}
|
- name: Set up Go ${{ env.latest_go }}
|
||||||
uses: actions/setup-go@v2
|
uses: actions/setup-go@v2
|
||||||
with:
|
with:
|
||||||
go-version: ${{ env.go }}
|
go-version: ${{ env.latest_go }}
|
||||||
|
|
||||||
- name: Check out code
|
|
||||||
uses: actions/checkout@v2
|
|
||||||
|
|
||||||
- name: Install gox
|
- name: Install gox
|
||||||
run: |
|
run: |
|
||||||
go get github.com/mitchellh/gox
|
go install github.com/mitchellh/gox@latest
|
||||||
|
|
||||||
|
- name: Check out code
|
||||||
|
uses: actions/checkout@v2
|
||||||
|
|
||||||
- name: Cross-compile with gox for ${{ matrix.targets }}
|
- name: Cross-compile with gox for ${{ matrix.targets }}
|
||||||
env:
|
env:
|
||||||
|
@ -238,13 +253,11 @@ jobs:
|
||||||
lint:
|
lint:
|
||||||
name: lint
|
name: lint
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
env:
|
|
||||||
go: 1.16.x
|
|
||||||
steps:
|
steps:
|
||||||
- name: Set up Go ${{ env.go }}
|
- name: Set up Go ${{ env.latest_go }}
|
||||||
uses: actions/setup-go@v2
|
uses: actions/setup-go@v2
|
||||||
with:
|
with:
|
||||||
go-version: ${{ env.go }}
|
go-version: ${{ env.latest_go }}
|
||||||
|
|
||||||
- name: Check out code
|
- name: Check out code
|
||||||
uses: actions/checkout@v2
|
uses: actions/checkout@v2
|
||||||
|
@ -253,7 +266,7 @@ jobs:
|
||||||
uses: golangci/golangci-lint-action@v2
|
uses: golangci/golangci-lint-action@v2
|
||||||
with:
|
with:
|
||||||
# Required: the version of golangci-lint is required and must be specified without patch version: we always use the latest patch version.
|
# Required: the version of golangci-lint is required and must be specified without patch version: we always use the latest patch version.
|
||||||
version: v1.36
|
version: v1.45
|
||||||
# Optional: show only new issues if it's a pull request. The default value is `false`.
|
# Optional: show only new issues if it's a pull request. The default value is `false`.
|
||||||
only-new-issues: true
|
only-new-issues: true
|
||||||
args: --verbose --timeout 5m
|
args: --verbose --timeout 5m
|
||||||
|
|
2
build.go
2
build.go
|
@ -59,7 +59,7 @@ var config = Config{
|
||||||
Main: "./cmd/restic", // package name for the main package
|
Main: "./cmd/restic", // package name for the main package
|
||||||
DefaultBuildTags: []string{"selfupdate"}, // specify build tags which are always used
|
DefaultBuildTags: []string{"selfupdate"}, // specify build tags which are always used
|
||||||
Tests: []string{"./..."}, // tests to run
|
Tests: []string{"./..."}, // tests to run
|
||||||
MinVersion: GoVersion{Major: 1, Minor: 11, Patch: 0}, // minimum Go version supported
|
MinVersion: GoVersion{Major: 1, Minor: 14, Patch: 0}, // minimum Go version supported
|
||||||
}
|
}
|
||||||
|
|
||||||
// Config configures the build.
|
// Config configures the build.
|
||||||
|
|
Loading…
Add table
Reference in a new issue