-
-
Notifications
You must be signed in to change notification settings - Fork 1
45 lines (38 loc) · 1.09 KB
/
go.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
name: Tests
on:
push:
paths:
- "**.go"
- go.mod
- go.sum
pull_request:
paths:
- "**.go"
- go.mod
- go.sum
jobs:
test:
strategy:
matrix:
os: [ubuntu-latest, macos-latest, windows-latest]
go: [1.16.x, 1.15.x, 1.14.x] # when adding a newer latest, update it below too.
runs-on: ${{ matrix.os }}
name: Test
steps:
- name: Set up Go ${{ matrix.node }}
uses: actions/setup-go@v2
with:
go-version: ${{ matrix.go }}
- name: Check out code
uses: actions/checkout@v2
- name: Download dependencies
run: go mod download
- name: Test
# TODO(henvic): Skip generating code coverage when not sending it to Coveralls to speed up testing.
continue-on-error: ${{ matrix.os != 'ubuntu-latest' || matrix.go != '1.16.x' }}
run: go test -race -covermode atomic -coverprofile=profile.cov ./...
- name: Code coverage
if: ${{ matrix.os == 'ubuntu-latest' && matrix.go == '1.16.x' }}
uses: shogo82148/actions-goveralls@v1
with:
path-to-profile: profile.cov