github actions: update go get to go install for go1.17

pull/38/head
Marc-Antoine Ruel 4 years ago
parent 455934ac1d
commit 4d03e3f68b

@ -52,22 +52,18 @@ jobs:
key: "${{runner.os}}-gopkg-${{hashFiles('go.sum', '.github/workflows/*.yml')}}"
# Fetch the tools before checking out, so they don't modify go.mod/go.sum.
- name: 'go get necessary tools'
run: >
cd ..;
go get -u -v
github.com/gordonklaus/ineffassign
github.com/securego/gosec/cmd/gosec
golang.org/x/lint/golint
golang.org/x/tools/go/analysis/passes/shadow/cmd/shadow
honnef.co/go/tools/cmd/staticcheck
- name: 'go get necessary tools (ubuntu)'
- name: 'go install necessary tools'
run: |
go install -v github.com/gordonklaus/ineffassign@latest
go install -v github.com/securego/gosec/cmd/gosec@latest
go install -v golang.org/x/lint/golint@latest
go install -v golang.org/x/tools/go/analysis/passes/shadow/cmd/shadow@latest
go install -v honnef.co/go/tools/cmd/staticcheck@latest
- name: 'go install necessary tools (ubuntu)'
if: always() && matrix.os == 'ubuntu-latest'
run: >
cd ..;
go get -u -v
github.com/client9/misspell/cmd/misspell
github.com/google/addlicense
run: |
go install -v github.com/client9/misspell/cmd/misspell@latest
go install -v github.com/google/addlicense@latest
# Now run proper checks.
- name: 'Check: go vet'
@ -165,10 +161,6 @@ jobs:
- name: "Check: go generate doesn't modify files"
run: |
go generate ./...
# TODO(maruel): Due to https://github.com/golang/go/issues/40276, ignore
# go.mod/go.sum modifications. Remove once a new Go toolchain fixes
# this.
git checkout HEAD -- go.mod go.sum
# Also test for untracked files.
TOUCHED=$(git status --porcelain --ignored)
if ! test -z "$TOUCHED"; then
@ -191,7 +183,7 @@ jobs:
# Force an upgrade to test cmd with tip of tree devices.
run: |
cd ..
git clone https://github.com/periph/cmd
git clone --depth 1 https://github.com/periph/cmd
cd cmd
go mod edit -replace=periph.io/x/devices/v3=../devices
go get -t ./...

Loading…
Cancel
Save