-
Notifications
You must be signed in to change notification settings - Fork 0
48 lines (46 loc) · 1.16 KB
/
test.yaml
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
name: test
on: [push]
jobs:
unittests:
runs-on: ubuntu-latest
timeout-minutes: 4
strategy:
fail-fast: false
steps:
- uses: actions/setup-go@v3
with:
go-version: "1.20"
- uses: actions/checkout@v3
- uses: technote-space/get-diff-action@v6
with:
PATTERNS: |
**/**.go
"!test/"
go.mod
go.sum
- name: grip tests
run: go test -race ./...
lint:
name: golangci-lint
runs-on: ubuntu-latest
timeout-minutes: 5
steps:
- uses: actions/checkout@v3
- uses: actions/setup-go@v3
with:
go-version: '1.20'
- uses: technote-space/get-diff-action@v6
with:
PATTERNS: |
**/**.go
go.mod
go.sum
- uses: golangci/golangci-lint-action@v3
with:
# Required: the version of golangci-lint is required and
# must be specified with patch version: we always use the
# latest patch version.
version: v1.51.2
args: --timeout 5m
github-token: ${{ secrets.github_token }}
if: env.GIT_DIFF