-
-
Notifications
You must be signed in to change notification settings - Fork 42
38 lines (35 loc) · 777 Bytes
/
test.yml
File metadata and controls
38 lines (35 loc) · 777 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
33
34
35
36
37
on:
push:
branches:
- "main"
tags:
- "v*.*.*"
pull_request:
jobs:
test:
name: Test
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
go:
- '^1.18'
- '^1.19'
- '^1.20'
- '^1.21'
- '^1.22'
steps:
- name: Check out code into the Go module directory
uses: actions/checkout@v4
- uses: actions/setup-go@v5
with:
go-version: ${{ matrix.go }}
cache: true
- name: Test Coverage (pkg)
run: go test ./... -race -coverprofile="coverage.txt"
- name: Upload coverage
if: ${{ matrix.go == '^1.22' }}
uses: codecov/codecov-action@v4
with:
file: "coverage.txt"
token: ${{ secrets.CODECOV_TOKEN }}