-
Notifications
You must be signed in to change notification settings - Fork 0
65 lines (50 loc) · 1.5 KB
/
testing.yaml
File metadata and controls
65 lines (50 loc) · 1.5 KB
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
name: testing
on:
push:
pull_request:
workflow_dispatch:
jobs:
run-tests:
if: (github.event_name == 'push') ||
(github.event_name == 'pull_request' &&
github.event.pull_request.head.repo.full_name != github.repository) ||
(github.event_name == 'workflow_dispatch')
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
golang: ['1.23', '1.24', 'stable']
steps:
- uses: actions/checkout@v4
- uses: actions/setup-go@v5
with:
go-version: ${{ matrix.golang }}
- name: run tests
run: make test
- name: run tests with race
run: make testrace
run-tests-with-coverage:
if: (github.event_name == 'push') ||
(github.event_name == 'pull_request' &&
github.event.pull_request.head.repo.full_name != github.repository) ||
(github.event_name == 'workflow_dispatch')
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-go@v5
with:
go-version: ${{ matrix.golang }}
- name: run tests, collect code coverage data and send to Coveralls
env:
COVERALLS_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: make coverage coveralls-deps coveralls
run-benchmarks:
if: false
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-go@v5
with:
go-version: ${{ matrix.golang }}
- name: run benchmarks
run: make bench