-
Notifications
You must be signed in to change notification settings - Fork 11
49 lines (46 loc) · 1.28 KB
/
test.yml
File metadata and controls
49 lines (46 loc) · 1.28 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
name: Test
permissions:
contents: read
pull-requests: write
on: [push, pull_request]
jobs:
test:
strategy:
matrix:
os: [ubuntu-latest, macos-latest, windows-latest]
go-version: ["1.24"]
runs-on: ${{ matrix.os }}
steps:
- name: Install tools
run: curl --version
- name: Checkout code
uses: actions/checkout@v4
- name: Install Go
uses: actions/setup-go@v5
with:
go-version: ${{ matrix.go-version }}
cache: true
- name: Test
if: matrix.os == 'macos-latest'
uses: nick-fields/retry@v2
with:
timeout_minutes: 30
max_attempts: 30
command: go test -v ./pkg/...
- name: Test with coverage
if: matrix.os == 'ubuntu-latest'
run: go test -v -coverprofile=coverage.txt -covermode=atomic ./pkg/...
- name: Codecov
if: matrix.os == 'ubuntu-latest'
uses: codecov/codecov-action@v5
with:
fail_ci_if_error: true
flags: unittests
token: ${{ secrets.CODECOV_TOKEN }}
- name: End to end test
if: matrix.os == 'ubuntu-latest'
uses: nick-fields/retry@v2
with:
timeout_minutes: 10
max_attempts: 30
command: make e2e