-
Notifications
You must be signed in to change notification settings - Fork 1
37 lines (29 loc) · 928 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
name: "Unit Tests"
on:
push:
branches:
- latest
pull_request:
branches:
- latest
jobs:
test:
runs-on: ubuntu-latest
name: Go unit tests
steps:
- uses: actions/checkout@44c2b7a8a4ea60a981eaca3cf939b5f4305c123b # v4.1.5
- name: Install libxml2-utils for xmllint
run: sudo apt-get install libxml2-utils
- name: Setup go
uses: actions/setup-go@cdcb36043654635271a94b9a6d1392de5bb323a7 # v5.0.1
with:
go-version-file: ./go.mod
- name: Set up gotestfmt
uses: gotesttools/gotestfmt-action@8b4478c7019be847373babde9300210e7de34bfb # v2.2.0
- run: make unittest
env:
EXTRA_TEST_FLAGS: -covermode=atomic -coverprofile=coverage.out
- name: Upload coverage reports to Codecov
uses: codecov/codecov-action@5ecb98a3c6b747ed38dc09f787459979aebb39be # v4.3.1
env:
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}