-
Notifications
You must be signed in to change notification settings - Fork 1.2k
42 lines (42 loc) · 1.11 KB
/
test.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
name: Test
on:
push:
branches:
- master
pull_request:
types: [ opened, synchronize ]
# When a new revision is pushed to a PR, cancel all in-progress CI runs for that
# PR. See https://docs.github.com/en/actions/using-jobs/using-concurrency
concurrency:
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
cancel-in-progress: true
jobs:
test:
strategy:
matrix:
os: [ubuntu-latest, windows-latest]
go: ["1.21", "1.22"]
runs-on: ${{ matrix.os }}
continue-on-error: true
steps:
- uses: actions/checkout@v4
- uses: actions/setup-go@v5
with:
go-version: ${{ matrix.go }}
- name: Core tests
uses: nick-fields/retry@v3
with:
max_attempts: 3
timeout_minutes: 20
command: |
go mod download
go test -race ./...
- name: Example tests
uses: nick-fields/retry@v3
with:
max_attempts: 3
timeout_minutes: 20
command: |
cd _examples
go mod download
go test -race ./...