mirror of https://github.com/periph/devices
github action: update for go1.17 and fix checks for PRs
- Use go1.17 for github actions.
- Use go mod edit instead of go get for testing other packages. There's two
benefits:
- This removes the round trip to pkg.go.dev and use the already present local
checkout.
- The go get periph.io/x/conn/v3@${GITHUB_SHA} command worked if a maintainer
push a branch, but fails for a PR. This is because the go get command does a
clone with all the branches, so it finds the commit even if it's not in main.
For a PR, one has to pull a specific refs/pull/ID/head ref that is not a
branch, thus go get cannot find it because git clone doesn't know about it.
The only way to work around is to git clone manually.
- Remove 'go version' and 'go env' since they are already run as part of
setup-go@v2.
- Fix a new check in go vet in example code.
pull/18/head
parent
440ba6e652
commit
97998e315b
Loading…
Reference in New Issue