-
Notifications
You must be signed in to change notification settings - Fork 8
34 lines (28 loc) · 850 Bytes
/
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
name: Go
on:
push:
branches: [ master ]
pull_request:
branches: [ master ]
# This enables a "Run workflow" button on the Actions tab
workflow_dispatch:
jobs:
build:
strategy:
matrix:
go-version: [ 1.13, 1.18 ]
os: [ ubuntu-latest, macos-latest, windows-latest ]
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v2
- name: Setup Go
uses: actions/setup-go@v2
with:
go-version: ${{ matrix.go-version }}
- name: Run tests
run: make test-race fmt vet
- name: Upload coverage to Codecov
if: ${{ github.event_name == 'push' && matrix.os == 'ubuntu-latest' && matrix.go-version == '1.13' }}
run: |
go test -coverprofile=coverage.txt -covermode=atomic ./...
bash <(curl -s https://codecov.io/bash)