Debian Codegraph @

.github/workflows/pr.yml

raw
1 name: PR
2
3 on:
4 pull_request:
5 branches: [ master ]
6
7
8 jobs:
9 gomod:
10 runs-on: ubuntu-latest
11 strategy:
12 matrix:
13 go: [
14 '1.18',
15 '1.17',
16 '1.16',
17 '1.15',
18 '1.14',
19 '1.13',
20 ]
21 name: Go ${{ matrix.go }}.x PR Validate
22 steps:
23 - name: Checkout code
24 uses: actions/checkout@v2
25 - name: Setup Go
26 uses: actions/setup-go@v2
27 with:
28 go-version: ${{ matrix.go }}
29 - name: Version
30 run: go version
31 - name: Build and Validate
32 run: |
33 go vet .
34 go test .
35 go test -cover -race -cpu 1,2,4 .
36 go build .
37
38 lint:
39 name: Lint
40 runs-on: ubuntu-latest
41 steps:
42 - uses: actions/checkout@v2
43 - name: golangci-lint
44 uses: golangci/golangci-lint-action@v2
45 with:
46 version: v1.45
47 only-new-issues: true
48