Debian Codegraph @

.github/workflows/coverage.yml

raw
1 name: coverage
2 on: [push, pull_request]
3
4 jobs:
5 coverage:
6 strategy:
7 matrix:
8 go-version: [^1]
9 os: [ubuntu-latest]
10 runs-on: ${{ matrix.os }}
11 env:
12 GO111MODULE: "on"
13 steps:
14 - name: Install Go
15 uses: actions/setup-go@v3
16 with:
17 go-version: ${{ matrix.go-version }}
18
19 - name: Checkout code
20 uses: actions/checkout@v3
21
22 - name: Coverage
23 env:
24 COVERALLS_TOKEN: ${{ secrets.GITHUB_TOKEN }}
25 run: |
26 go test -race -covermode atomic -coverprofile=profile.cov ./...
27 GO111MODULE=off go get github.com/mattn/goveralls
28 $(go env GOPATH)/bin/goveralls -coverprofile=profile.cov -service=github