-
Notifications
You must be signed in to change notification settings - Fork 39
45 lines (40 loc) · 1.05 KB
/
test-with-coverage.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
44
45
name: ci-build
on:
push:
branches:
- master
tags-ignore:
- '*.*'
pull_request_target:
types: [ opened, synchronize, reopened, ready_for_review ]
branches:
- master
jobs:
test-with-coverage:
name: Test with Coverage
runs-on: ubuntu-20.04
steps:
- name: Checkout code
uses: actions/checkout@v4
with:
ref: ${{github.event.pull_request.head.ref}}
repository: ${{github.event.pull_request.head.repo.full_name}}
fetch-depth: 0
- name: Install Go
uses: actions/setup-go@v5
with:
go-version-file: go.mod
- name: Generate Assets
run: |
make generate-assets
- name: Test
run: |
make test-with-coverage
- name: Upload code coverage
uses: codecov/codecov-action@v4
with:
token: ${{ secrets.CODECOV_TOKEN }}
files: ./build/_output/coverage/coverage.txt
flags: unittests # optional
fail_ci_if_error: true # optional (default = false)
verbose: true # optional (default = false)