-
Notifications
You must be signed in to change notification settings - Fork 0
49 lines (42 loc) · 1.13 KB
/
build.yaml
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
46
47
48
49
name: build
on: [push, pull_request]
jobs:
test:
name: Tests
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
go:
- "1.14.x"
- "1.15.x"
- "1.16.x"
- "1.17.x"
os:
- ubuntu-latest
- macos-latest
- windows-latest
steps:
- name: Checkout repository
uses: actions/checkout@v2
- name: Install Go
uses: actions/setup-go@v2
with:
go-version: ${{ matrix.go }}
- name: Check version
run: go version
- name: Run tests with coverage
if: matrix.os != 'windows-latest'
run: go test -race -coverprofile=coverage.txt -covermode=atomic ./...
- name: Run tests without coverage (windows)
if: matrix.os == 'windows-latest'
run: go test -race ./...
- name: Upload coverage
if: matrix.os != 'windows-latest'
uses: codecov/codecov-action@v2
with:
# token: ${{ secrets.CODECOV_TOKEN }}
# fail_ci_if_error: true
verbose: true
flags: unittests
file: coverage.txt