-
Notifications
You must be signed in to change notification settings - Fork 222
56 lines (45 loc) · 1019 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
54
55
56
name: Unit Test
on:
push:
branches: [ master ]
pull_request:
branches: [ master ]
jobs:
test:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Set up Go
uses: actions/setup-go@v4
with:
go-version: 1.23.2
- name: Test
run: go test ./...
race-test:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Set up Go
uses: actions/setup-go@v4
with:
go-version: 1.23.2
- name: Test with race
run: go test -race ./...
golangci:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v2
- name: Set up Go
uses: actions/setup-go@v4
with:
go-version: 1.23.2
- name: Go generate and check diff
run: |
go generate ./...
git diff --exit-code
- name: Lint
uses: golangci/golangci-lint-action@v3
with:
version: v1.61.0
skip-pkg-cache: true