-
Notifications
You must be signed in to change notification settings - Fork 0
30 lines (24 loc) · 737 Bytes
/
go.yml
File metadata and controls
30 lines (24 loc) · 737 Bytes
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
name: Go
on:
push:
branches: [ main ]
pull_request:
branches: [ main ]
jobs:
test:
strategy:
matrix:
go_version: [ '1.14', '1.15', '1.16', '1.17' ]
os: [ 'ubuntu-latest', 'windows-latest', 'macOS-latest' ]
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v2
- name: Use GO ${{ matrix.go_version }}
uses: actions/setup-go@v2
with:
go-version: ${{ matrix.go_version }}
- name: Test GO ${{ matrix.go_version }}
run: go test ./... -race -coverprofile=coverage.txt -covermode=atomic
- name: Upload to codecov
if: ${{ matrix.os == 'ubuntu-latest' && matrix.go_version == '1.17' }}
run: bash <(curl -s https://codecov.io/bash)