-
-
Notifications
You must be signed in to change notification settings - Fork 14
32 lines (30 loc) · 847 Bytes
/
coverage-report.yaml
File metadata and controls
32 lines (30 loc) · 847 Bytes
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
name: Coverage Report
on:
- push
- pull_request
- release
jobs:
TestAndReport:
runs-on: ubuntu-22.04
steps:
- name: Set up Go
uses: actions/setup-go@v4
with:
go-version: 1.19.x
- uses: actions/checkout@v3.6.0
- name: Test
run: |
go test ./... -coverprofile coverage.out
- name: Report
env:
CODACY_PROJECT_TOKEN: ${{ secrets.CODACY_PROJECT_TOKEN }}
run: |
bash <(curl -Ls https://coverage.codacy.com/get.sh) report -r coverage.out --force-coverage-parser go
- name: Upload coverage to Codecov
uses: codecov/codecov-action@v3.1.4
with:
token: ${{ secrets.CODECOV_TOKEN }}
files: coverage.out
flags: unittests
name: codecov-umbrella
fail_ci_if_error: true