-
-
Notifications
You must be signed in to change notification settings - Fork 7
32 lines (29 loc) · 753 Bytes
/
test.yml
File metadata and controls
32 lines (29 loc) · 753 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
32
name: Test
on:
push:
branches: [ main ]
pull_request:
branches: [ main ]
jobs:
build:
name: Build
strategy:
matrix:
os: [ubuntu-latest]
go: [1.21]
runs-on: ${{ matrix.os }}
steps:
- name: Set up Go 1.x
uses: actions/setup-go@v5
with:
go-version: ${{ matrix.go }}
- name: Check out code into the Go module directory
uses: actions/checkout@v4
- name: Test
run: go test -race ./...
- name: Coverage
run: go test -race -coverprofile=coverage.txt -covermode=atomic ./...
if: matrix.go == 1.19 && matrix.os == 'ubuntu-latest'
- name: Codecov
uses: codecov/codecov-action@v5
if: matrix.go == 1.19 && matrix.os == 'ubuntu-latest'