-
Notifications
You must be signed in to change notification settings - Fork 1.7k
43 lines (36 loc) · 910 Bytes
/
test.yml
File metadata and controls
43 lines (36 loc) · 910 Bytes
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
name: Tests
on:
push:
branches:
- main
pull_request:
workflow_dispatch:
permissions:
contents: read
id-token: write
jobs:
test:
name: Test (${{ matrix.os }})
strategy:
matrix:
os: [ubuntu-latest, macos-latest, windows-latest]
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v6
- uses: actions/setup-go@v6
with:
go-version-file: go.mod
- name: Run tests
if: matrix.os == 'windows-latest'
run: go test -v ./...
- name: Run tests with coverage
if: matrix.os != 'windows-latest'
run: go test -v -coverprofile=coverage.out ./...
- name: Upload coverage
if: matrix.os == 'ubuntu-latest'
uses: codecov/codecov-action@v6
with:
use_oidc: true
files: ./coverage.out
fail_ci_if_error: false
flags: unittests