...
1on: [push, pull_request]
2name: build
3jobs:
4 test:
5 strategy:
6 matrix:
7 go-version: [1.19.x, 1.20.x]
8 os: [ubuntu-latest, macos-latest, windows-latest]
9 runs-on: ${{ matrix.os }}
10 steps:
11 - name: Install Go
12 uses: actions/setup-go@v4
13 with:
14 go-version: ${{ matrix.go-version }}
15 - name: Checkout code
16 uses: actions/checkout@v3
17 - name: Test
18 run: go test -covermode atomic -coverprofile='profile.cov' ./...
19 - name: Send coverage
20 if: runner.os == 'Linux'
21 env:
22 COVERALLS_TOKEN: ${{ secrets.GITHUB_TOKEN }}
23 run: |
24 GO111MODULE=off go get github.com/mattn/goveralls
25 $(go env GOPATH)/bin/goveralls -coverprofile=profile.cov -service=github
View as plain text