-
-
Notifications
You must be signed in to change notification settings - Fork 38
62 lines (50 loc) · 1.56 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@0080882f6c36860b6ba35c610c98ce87d4e2f26f # v2.10.2
with:
egress-policy: audit
- name: Checkout
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
with:
fetch-depth: 0
- uses: actions/setup-go@3041bf56c941b39c61721a86cd11f3bb1338122a # v5.2.0
with:
go-version: '1.22'
- name: Install Protoc
uses: arduino/setup-protoc@c65c819552d16ad3c9b72d9dfd5ba5237b9c906b # v3.0.0
- name: Install protoc-gen-go-orm
run: go get github.com/shortlink-org/shortlink/tree/main/pkg/protoc/protoc-gen-go-orm
- name: Run coverage
run: go test -coverprofile=coverage.txt -covermode atomic -race -tags=unit -v ./...
- uses: codecov/codecov-action@1e68e06f1dbfde0e4cefc87efeba9e4643565303 # v5.1.2
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)