github.com/tenntenn/testtime@v0.2.3-0.20221118081726-55bcd1f05226/.github/workflows/testandvet.yml (about) 1 name: Test and Vet 2 3 on: 4 push: 5 branches: 6 - main 7 pull_request: 8 branches: 9 - main 10 release: 11 types: 12 - published 13 - created 14 - edited 15 16 defaults: 17 run: 18 shell: bash 19 20 jobs: 21 test: 22 runs-on: ubuntu-20.04 23 24 steps: 25 - name: Install Go 26 uses: actions/setup-go@v2 27 with: 28 go-version: 1.16.x 29 30 - name: Checkout code 31 uses: actions/checkout@v2 32 33 - name: Cache Go module and build cache 34 uses: actions/cache@v2 35 with: 36 key: go-${{ hashFiles('**/go.sum') }} 37 path: | 38 ~/go/pkg/mod 39 restore-keys: | 40 go- 41 42 - name: Install tennvet 43 run: | 44 GOBIN=$(pwd) go install github.com/tenntenn/tennvet@latest 45 46 - name: Test and vet 47 run: | 48 go vet ./... 49 go vet -vettool=$(pwd)/tennvet ./... 50 go test -v -race ./...