-
Notifications
You must be signed in to change notification settings - Fork 0
41 lines (33 loc) · 908 Bytes
/
unit-tests.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
name: Run unit tests
on:
pull_request:
branches: [ "main" ]
permissions:
contents: read
jobs:
unit-tests:
name: Run unit tests
runs-on: ubuntu-latest
steps:
- name: Set up Go
uses: actions/setup-go@v3
with:
go-version: '1.21' # Use the version of Go you need for your project
- name: Check out code into the Go module directory
uses: actions/checkout@v3
- name: Test
run: make test
- name: Upload test coverage
uses: actions/upload-artifact@v3
if: always()
with:
name: test-coverage
path: coverage.html
- name: Upload coverage to Codecov
uses: codecov/codecov-action@v1
with:
token: ${{ secrets.CODECOV_TOKEN }}
file: ./coverage.out
flags: unittests
name: codecov-umbrella
fail_ci_if_error: true