-
Notifications
You must be signed in to change notification settings - Fork 14
31 lines (31 loc) · 726 Bytes
/
Copy pathtest.yml
File metadata and controls
31 lines (31 loc) · 726 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
31
on:
pull_request:
branches: [main]
push:
branches: [main]
jobs:
test:
strategy:
matrix:
go-version:
- 1.19.x
platform:
- ubuntu-latest
- macos-latest
runs-on: ${{ matrix.platform }}
steps:
- name: Install Go
uses: actions/setup-go@v1
with:
go-version: ${{ matrix.go-version }}
- name: Checkout code
uses: actions/checkout@v2
- name: Test
run: go test -v -race -coverprofile=coverage.txt -covermode=atomic ./...
- name: Report coverage
uses: codecov/codecov-action@v4
with:
file: coverage.txt
fail_ci_if_error: true
env:
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}