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')}}" 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. # Fetch the tools before checking out, so they don't modify go.mod/go.sum.
- name: 'go get necessary tools' - name: 'go install necessary tools'
run: > run: |
cd ..; go install -v github.com/gordonklaus/ineffassign@latest
go get -u -v go install -v github.com/securego/gosec/cmd/gosec@latest
github.com/gordonklaus/ineffassign go install -v golang.org/x/lint/golint@latest
github.com/securego/gosec/cmd/gosec go install -v golang.org/x/tools/go/analysis/passes/shadow/cmd/shadow@latest
golang.org/x/lint/golint go install -v honnef.co/go/tools/cmd/staticcheck@latest
golang.org/x/tools/go/analysis/passes/shadow/cmd/shadow - name: 'go install necessary tools (ubuntu)'
honnef.co/go/tools/cmd/staticcheck
- name: 'go get necessary tools (ubuntu)'
if: always() && matrix.os == 'ubuntu-latest' if: always() && matrix.os == 'ubuntu-latest'
run: > run: |
cd ..; go install -v github.com/client9/misspell/cmd/misspell@latest
go get -u -v go install -v github.com/google/addlicense@latest
github.com/client9/misspell/cmd/misspell
github.com/google/addlicense
# Now run proper checks. # Now run proper checks.
- name: 'Check: go vet' - name: 'Check: go vet'
@ -165,10 +161,6 @@ jobs:
- name: "Check: go generate doesn't modify files" - name: "Check: go generate doesn't modify files"
run: | run: |
go generate ./... 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. # Also test for untracked files.
TOUCHED=$(git status --porcelain --ignored) TOUCHED=$(git status --porcelain --ignored)
if ! test -z "$TOUCHED"; then if ! test -z "$TOUCHED"; then
@ -191,7 +183,7 @@ jobs:
# Force an upgrade to test cmd with tip of tree devices. # Force an upgrade to test cmd with tip of tree devices.
run: | run: |
cd .. cd ..
git clone https://github.com/periph/cmd git clone --depth 1 https://github.com/periph/cmd
cd cmd cd cmd
go mod edit -replace=periph.io/x/devices/v3=../devices go mod edit -replace=periph.io/x/devices/v3=../devices
go get -t ./... go get -t ./...

Loading…
Cancel
Save