-
Notifications
You must be signed in to change notification settings - Fork 0
53 lines (43 loc) · 1007 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
42
43
44
45
46
47
48
49
50
51
52
53
name: Unittest
on:
push:
pull_request:
branches: [ "main" ]
jobs:
build:
name: Test on ${{ matrix.gover }}
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
gover:
- "1.13"
- "1.14"
- "1.15"
- "1.16"
- "1.17"
- "1.18"
- "1.19"
- "1.20"
- "1.21"
env:
GOVER: ${{ matrix.gover }}
GOLANGCILINT_VER: v1.52.2
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Set up Go
uses: actions/setup-go@v3
with:
go-version: ${{ env.GOVER }}
- name: Tidy
run: go mod tidy -compat=${{ env.GOVER }}
- name: Test
run: go test -count=1 -race -coverprofile=coverage.txt -covermode=atomic ./...
- name: Cover
uses: codecov/codecov-action@v3
- name: Lint
uses: golangci/[email protected]
with:
version: ${{ env.GOLANGCILINT_VER }}
skip-cache: true