-
Notifications
You must be signed in to change notification settings - Fork 7
66 lines (62 loc) · 1.42 KB
/
ci.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
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
name: ci
on:
push:
branches:
- '*'
pull_request:
branches:
- '*'
jobs:
run-tests:
name: Run Tests
runs-on: ubuntu-latest
strategy:
matrix:
go-version:
- '1.18'
- '1.19'
- '1.20'
- '1.21'
- '1.22'
steps:
- uses: actions/checkout@v4
with:
submodules: true
- name: Set up Go
uses: actions/setup-go@v5
with:
go-version: ${{ matrix.go-version }}
- name: Install deps
run: go mod download
- name: Tests
run: make test
static-check:
name: Run Static Checks
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Set up Go
uses: actions/setup-go@v5
with:
go-version: '1.18'
- name: Install deps
run: go mod download
- name: go vet ./...
run: go vet ./...
# TODO: improve with caching
- uses: dominikh/[email protected]
with:
version: "2022.1.1"
install-go: false
min-go-version: "1.18"
golangci-lint:
name: Lint
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Set up Go
uses: actions/setup-go@v5
with:
go-version: '1.22'
- name: golangci-lint
uses: golangci/golangci-lint-action@971e284b6050e8a5849b72094c50ab08da042db8 # v6.1.1