Merge pull request #8 from gostaticanalysis/add-tagpr #5
This file contains 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
name: Test and Vet | |
on: | |
push: | |
branches: | |
- main | |
pull_request: | |
branches: | |
- main | |
release: | |
types: | |
- published | |
- created | |
- edited | |
defaults: | |
run: | |
shell: bash | |
jobs: | |
test: | |
runs-on: ubuntu-24.04 | |
steps: | |
- name: Install Go | |
uses: actions/[email protected] | |
with: | |
go-version: 1.23.3 | |
- name: Checkout code | |
uses: actions/[email protected] | |
- name: Cache Go module and build cache | |
uses: actions/[email protected] | |
with: | |
key: go-${{ hashFiles('**/go.sum') }} | |
path: | | |
~/go/pkg/mod | |
restore-keys: | | |
go- | |
- name: Install tennvet | |
run: | | |
GOBIN=$(pwd) go install github.com/tenntenn/tennvet@latest | |
- name: Test and vet | |
run: | | |
go vet ./... | |
go vet -vettool=$(pwd)/tennvet ./... | |
go test -v -race ./... |