Debian Codegraph @

.github/workflows/test.yml

raw
1 name: test
2
3 on:
4 - push
5 - pull_request
6
7 permissions:
8 contents: read
9
10 concurrency:
11 cancel-in-progress: true
12 group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
13
14 jobs:
15 test:
16 name: test
17 runs-on: ubuntu-latest
18 steps:
19 - name: Code checkout
20 uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
21 with:
22 persist-credentials: false
23
24 - name: Setup Go
25 id: go
26 uses: actions/setup-go@4a3601121dd01d1626a1e23e37211e3254c1c06c # v6.4.0
27 with:
28 cache-dependency-path: |
29 go.sum
30 go-version-file: 'go.mod'
31
32 - run: go version
33
34 - name: Test
35 run: |
36 go test -v ./... -coverprofile=coverage.txt -covermode=atomic
37 GOARCH=386 go test ./... -coverprofile=coverage.txt -covermode=atomic
38 go test -v ./... -race
39
40 - name: Publish coverage
41 uses: codecov/codecov-action@e79a6962e0d4c0c17b229090214935d2e33f8354 # v6.0.1
42 with:
43 token: ${{secrets.CODECOV_TOKEN}}
44 files: ./coverage.txt
45 fail_ci_if_error: false