-
Notifications
You must be signed in to change notification settings - Fork 65
45 lines (40 loc) · 998 Bytes
/
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
43
44
45
name: Test
on:
push:
branches:
- master
- dev
pull_request:
branches:
- master
- dev
jobs:
run-unit-tests:
name: Unit Tests
concurrency:
group: unit-${{ github.ref }}-${{ matrix.os }}-${{ matrix.go-version }}
cancel-in-progress: true
strategy:
fail-fast: false
matrix:
os: [ubuntu, macOS]
env:
OS: ${{ matrix.os }}-latest
GO: ${{ matrix.go-version }}
runs-on: ${{ matrix.os }}-latest
steps:
- name: Checkout code
uses: actions/checkout@v3
- name: Install Go
uses: actions/setup-go@v3
with:
go-version: 1.21.x
cache: true
- name: Test
run: go test -race -coverprofile unit.txt -covermode atomic ./...
- name: Upload coverage report to Codecov
uses: codecov/codecov-action@v3
with:
file: ./unit.txt
flags: unit,${{ matrix.os }},go-${{ matrix.go-version }}
name: unit