ci: bump codecov/codecov-action from 6 to 7 (#121) #377
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| on: [push, pull_request] | |
| jobs: | |
| check: | |
| runs-on: ubuntu-latest | |
| name: Lint | |
| steps: | |
| - uses: actions/checkout@v6 | |
| - uses: actions/setup-go@v6 | |
| with: | |
| go-version: "1.26.x" | |
| - name: Check for //go:build ignore in .go files | |
| run: | | |
| IGNORED_FILES=$(grep -rl '//go:build ignore' . --include='*.go') || true | |
| if [ -n "$IGNORED_FILES" ]; then | |
| echo "::error::Found ignored Go files: $IGNORED_FILES" | |
| exit 1 | |
| fi | |
| - name: Check that go.mod is tidied | |
| if: success() || failure() # run this step even if the previous one failed | |
| run: go mod tidy -diff | |
| - name: Run code generators | |
| if: success() || failure() # run this step even if the previous one failed | |
| run: .github/workflows/go-generate.sh | |
| - name: gofmt | |
| if: success() || failure() # run this step even if the previous one failed | |
| run: | | |
| out=$(gofmt -s -l .) | |
| if [[ -n "$out" ]]; then | |
| echo $out | awk '{print "::error file=" $0 ",line=0,col=0::File is not gofmt-ed."}' | |
| exit 1 | |
| fi | |
| - name: go vet | |
| if: success() || failure() # run this step even if the previous one failed | |
| run: go vet ./... | |
| - name: Install staticcheck | |
| if: success() || failure() # run this step even if the previous one failed | |
| run: go install honnef.co/go/tools/cmd/staticcheck@v0.6.1 | |
| - name: staticcheck | |
| if: success() || failure() # run this step even if the previous one failed | |
| run: | | |
| set -o pipefail | |
| staticcheck ./... | sed -e 's@\(.*\)\.go@./\1.go@g' |