-
-
Notifications
You must be signed in to change notification settings - Fork 38
62 lines (50 loc) · 1.53 KB
/
codecov.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
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
name: CodeCov
on:
push:
branches:
- main
paths:
- '**.go'
- 'go.mod'
- 'go.sum'
pull_request:
branches:
- main
paths:
- '**.go'
- 'go.mod'
- 'go.sum'
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
permissions:
contents: read
jobs:
analyze:
name: CodeCov
runs-on: ubuntu-latest
steps:
- name: Harden Runner
uses: step-security/harden-runner@eb238b55efaa70779f274895e782ed17c84f2895 # v2.6.1
with:
egress-policy: audit
- name: Checkout
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
with:
fetch-depth: 0
- uses: actions/setup-go@93397bea11091df50f3d7e59dc26a7711a8bcfbe # v4.1.0
with:
go-version: '1.21'
- name: Install Protoc
uses: arduino/setup-protoc@v2
- name: Install protoc-gen-go-orm
run: go get github.com/shortlink-org/shortlink/tree/main/internal/pkg/protoc/protoc-gen-go-orm
- name: Run coverage
run: go test -coverprofile=coverage.txt -covermode atomic -race -tags=unit -v ./internal/...
- uses: codecov/codecov-action@eaaf4bedf32dbdc6b720b63067d99c4d77d6047d # v3.1.4
with:
token: ${{ secrets.CODECOV_TOKEN }} # not required for public repos
files: ./coverage.txt # optional
flags: unittests # optional
fail_ci_if_error: true # optional (default = false)
verbose: true # optional (default = false)