-
-
Notifications
You must be signed in to change notification settings - Fork 3
41 lines (35 loc) · 946 Bytes
/
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
name: Unit Test
on:
push:
branches:
- master
pull_request:
branches:
- master
jobs:
run-test:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: setup go
uses: actions/setup-go@v3
with:
go-version: "1.18"
- name: Cache go modules
uses: actions/cache@v2
with:
path: |
${{ steps.vars.outputs.go_cache }}
~/go/pkg/mod
key: ${{ runner.os }}-${{ matrix.go }}-go-ci-${{ hashFiles('**/go.sum') }}
restore-keys: |
${{ runner.os }}-${{ matrix.go }}-go-ci
- name: Run unit tests
run: go test -race -coverprofile=coverage -covermode=atomic -v ./...
- name: Upload code coverage report to Codecov
uses: codecov/codecov-action@v3
with:
file: ./coverage
flags: unittests
verbose: true
name: codecov-grm