CI: use staticcheck-action
@@ -2,9 +2,10 @@ name: "CI"
on: ["push", "pull_request"]
jobs:
- test:
- name: "Run unit tests"
+ ci:
+ name: "Run CI"
strategy:
+ fail-fast: false
matrix:
os: ["windows-latest", "ubuntu-latest", "macOS-latest"]
go: ["1.16.x", "1.17.x"]
@@ -13,27 +14,14 @@ jobs:
- uses: actions/checkout@v1
with:
fetch-depth: 1
- - uses: WillAbides/setup-go-faster@v1.5.0
+ - uses: WillAbides/setup-go-faster@v1.7.0
with:
go-version: ${{ matrix.go }}
- run: "go test ./..."
-
- lint:
- name: "Run static analysis"
- runs-on: "ubuntu-latest"
- steps:
- - uses: WillAbides/setup-go-faster@v1.5.0
- with:
- go-version: "1.16.x"
- - run: "GO111MODULE=on go get honnef.co/go/tools/cmd/staticcheck"
- - uses: actions/checkout@v1
- with:
- fetch-depth: 1
- - uses: actions/cache@v2
- with:
- path: ~/.cache/staticcheck
- key: staticcheck-${{ github.sha }}
- restore-keys: |
- staticcheck-
- run: "go vet ./..."
- - run: "$(go env GOPATH)/bin/staticcheck -go 1.16 ./..."
+ - uses: dominikh/staticcheck-action@v1.0.0
+ with:
+ version: 274e0ee95850bc820301bfe5961eed9ebc8cb9e1
+ min-go-version: "1.16"
+ install-go: false
+ cache-key: ${{ matrix.go }}
