-
Notifications
You must be signed in to change notification settings - Fork 2
40 lines (40 loc) · 1.04 KB
/
tests.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
on:
push:
pull_request:
schedule:
- cron: '0 12 1 * *'
name: tests
jobs:
Test:
strategy:
fail-fast: false
matrix:
go-version:
- 1.12.x
- 1.13.x
- 1.14.x
- 1.15.x
- 1.x
os:
- ubuntu-latest
- windows-latest
- macos-latest
runs-on: ${{ matrix.os }}
steps:
- name: Install Go
uses: actions/setup-go@v2
with:
go-version: ${{ matrix.go-version }}
- name: Set git to turn off auto-converting line endings
run: git config --global core.autocrlf false
- name: Checkout code
uses: actions/checkout@v2
- name: Test (not on Windows)
run: go test -coverprofile=coverage.txt -covermode=atomic ./...
if: runner.os != 'Windows'
- name: Test (on Windows)
run: go test -coverprofile=coverage.txt -covermode=atomic ./...
shell: cmd
if: runner.os == 'Windows'
- name: Upload coverage to Codecov
uses: codecov/codecov-action@v1