-
Notifications
You must be signed in to change notification settings - Fork 304
53 lines (39 loc) · 1001 Bytes
/
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
49
50
51
52
53
name: test
on:
pull_request:
branches: ['*']
permissions:
contents: read
jobs:
test:
name: Run tests
runs-on: ubuntu-latest
strategy:
matrix:
go: ["stable", "oldstable"]
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Setup Go
uses: actions/setup-go@v5
with:
go-version: ${{ matrix.go }}
cache-dependency-path: '**/go.sum'
- name: Download dependencies
run: go mod download
- name: Lint
if: matrix.latest
run: make lint
- name: Test
run: make test
- name: Make coverage
if: matrix.latest
run: make cover
- name: Upload coverage to codecov.io
if: matrix.latest
uses: codecov/codecov-action@v4
env:
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}
# TODO decide whether we want to benchmark on every run.
# name: Benchmark
# run: make bench