-
Notifications
You must be signed in to change notification settings - Fork 4
41 lines (38 loc) · 1.08 KB
/
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
name: Validate
on:
push:
branches:
- main
pull_request:
concurrency:
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
cancel-in-progress: true
jobs:
test:
strategy:
matrix:
os: [ubuntu-latest, macos-latest] # TODO: Explore adding Windows support
runs-on: ${{ matrix.os }}
env:
GO111MODULE: on
steps:
- name: Checkout Source
uses: actions/checkout@v4
- name: Set up Go
uses: actions/setup-go@v5
with:
go-version: "^1.23"
- name: Run Tests with Retries
uses: nick-invision/retry@v3
with:
timeout_minutes: 5
max_attempts: 3
command: go test ./... -race -coverprofile=coverage.txt -covermode=atomic -timeout 5m
- name: Upload coverage to Codecov
uses: codecov/codecov-action@v5
if: matrix.os == 'ubuntu-latest' # Only upload coverage from one OS
env:
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}
with:
files: ./coverage.txt
fail_ci_if_error: false