-
Notifications
You must be signed in to change notification settings - Fork 0
41 lines (39 loc) · 965 Bytes
/
test.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
name: Test
on: [push]
env:
GO111MODULE: on
jobs:
test:
runs-on: ubuntu-latest
strategy:
matrix:
go: [ 'stable', 'oldstable' ]
name: Go ${{ matrix.go }}
steps:
- name: Setup Go
uses: actions/setup-go@v5
with:
go-version: ${{ matrix.go }}
- name: Checkout
uses: actions/checkout@v4
- name: Run Tests
run: go test -v -race ./...
codecov:
needs: test
runs-on: ubuntu-latest
name: Codecov
steps:
- name: Setup Go
uses: actions/setup-go@v5
with:
go-version: 'stable'
- name: Checkout
uses: actions/checkout@v4
- name: Run Tests
run: go test -v -race -coverprofile=coverage.txt -covermode=atomic ./...
- name: Upload to Codecov
uses: codecov/codecov-action@v4
with:
fail_ci_if_error: true
file: ./coverage.txt
token: ${{ secrets.CODECOV_TOKEN }}