-
Notifications
You must be signed in to change notification settings - Fork 30
44 lines (37 loc) · 1.03 KB
/
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
name: Codecov Integration
on:
push:
branches:
- main
pull_request:
branches:
- main
jobs:
build-and-report:
runs-on: ubuntu-latest
name: Build, Test, and Report Coverage
steps:
- name: Checkout code
uses: actions/checkout@v2
- name: Set up Go
uses: actions/setup-go@v2
with:
go-version: "1.20"
- name: Build
run: go build -v ./...
- name: Test Coverage
run: sudo go test ./... -race -coverprofile=coverage.out -covermode=atomic -v
- name: Upload coverage to Codecov
uses: codecov/codecov-action@v3
with:
token: ${{ secrets.CODECOV_TOKEN }}
files: ./coverage.out
flags: unittests
name: codecov-umbrella
verbose: true
# - name: Codacy Coverage Reporter
# uses: codacy/codacy-coverage-reporter-action@v1
# with:
# #language: "go"
# project-token: ${{ secrets.CODACY_PROJECT_TOKEN }}
# #coverage-reports: ./coverage.out