-
Notifications
You must be signed in to change notification settings - Fork 18
43 lines (40 loc) · 1007 Bytes
/
unit.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
name: unit-testing
on:
push:
env:
TERM: "xterm"
FORCE_COLOR: "1"
CGO_CFLAGS_ALLOW: ".*"
CGO_LDFLAGS_ALLOW: ".*"
jobs:
build:
strategy:
matrix:
env_image:
- nedrey/dpdk-rockylinux8:v21.11-go1.19-snf
- nedrey/dpdk-rockylinux8:v22.11.3-go1.21.3-snf
- nedrey/dpdk-rockylinux8:v23.11-go1.21.4-snf
runs-on: ubuntu-latest
container: ${{ matrix.env_image }}
steps:
-
name: Checkout
uses: actions/checkout@v3
-
name: Unit Tests
run: |
go test -coverprofile=coverage.out -covermode=atomic ./...
-
name: Generate Coverage Report
run: |
gocover-cobertura < coverage.out > coverage.xml
-
name: Save Coverage Report
uses: actions/upload-artifact@v3
with:
name: coverage-report
path: ./coverage.*
retention-days: 14
-
name: Upload Coverage Report
uses: codecov/codecov-action@v3