Merge pull request #18 from tenntenn/gofmt-checker_test.go #36
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-20.04 | |
steps: | |
- name: Install Go | |
uses: actions/setup-go@v2 | |
with: | |
go-version: 1.18.x | |
- name: Checkout code | |
uses: actions/checkout@v2 | |
- name: Cache Go module and build cache | |
uses: actions/cache@v2 | |
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 ./... |