-
Notifications
You must be signed in to change notification settings - Fork 5
71 lines (57 loc) · 1.27 KB
/
ci.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
57
58
59
60
61
62
63
64
65
66
67
68
69
70
name: CI
on:
push:
branches:
- master
pull_request:
branches:
- master
concurrency:
group: ${{ github.workflow }}-${{ github.ref_name }}
cancel-in-progress: true
jobs:
golangci:
name: lint
runs-on: ubuntu-latest
timeout-minutes: 5
strategy:
fail-fast: true
matrix:
go: ['1.20.x']
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Install Go
uses: actions/setup-go@v4
with:
go-version: ${{ matrix.go }}
check-latest: true
- name: Go Tidy
run: go mod tidy && git diff --exit-code
- name: Go Mod
run: go mod download
# catch supply chain attacks
- name: Go Mod Verify
run: go mod verify
- name: Lint
uses: golangci/golangci-lint-action@v2
with:
version: latest
test:
name: test
runs-on: ubuntu-latest
timeout-minutes: 5
strategy:
fail-fast: true
matrix:
go: ['stable', 'oldstable']
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Install Go
uses: actions/setup-go@v4
with:
go-version: ${{ matrix.go }}
check-latest: true
- name: Test
run: make test