-
Notifications
You must be signed in to change notification settings - Fork 233
46 lines (44 loc) · 1.02 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
42
43
44
45
46
name: Test
on:
push:
branches:
- main
paths:
- "**/*.go"
- "go.mod"
- "go.sum"
- "Makefile"
- ".github/workflows/test.yaml"
pull_request:
types: [opened, reopened, synchronize]
branches:
- main
paths:
- "**/*.go"
- "go.mod"
- "go.sum"
- "Makefile"
- ".github/workflows/test.yaml"
jobs:
test:
name: Unit Testing
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-latest, windows-latest, macos-latest]
steps:
- name: Checkout Source Code
uses: actions/checkout@v4
- name: Setup Go Environment
uses: actions/setup-go@v5
with:
go-version-file: go.mod
id: go
- name: Go Get dependencies
run: go get -v -t -d ./...
- name: Go Test
run: make test TEST_FLAGS="-coverprofile=coverage.txt -covermode=atomic"
- name: Upload coverage to Codecov
uses: codecov/[email protected]
with:
file: ./coverage.txt