-
Notifications
You must be signed in to change notification settings - Fork 53
61 lines (52 loc) · 1.44 KB
/
test.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
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
name: Test Go code
on:
push:
branches:
- main
pull_request:
branches:
- main
permissions: read-all
jobs:
test-go:
runs-on: ubuntu-latest
steps:
- name: Check out code
uses: actions/checkout@v4
with:
show-progress: false
- name: Set up Go
uses: actions/setup-go@v5
with:
go-version-file: go.ver
cache: false
- name: Test
run: make test
- name: Check for local changes
run: git diff --exit-code
# Codecov reporting is unreliable.
# Re-run report 3 times to have a better
# chance of success.
- name: Report code coverage (1)
uses: codecov/codecov-action@v4
with:
token: ${{ secrets.CODECOV_TOKEN }}
files: ./.cover/coverage.out
fail_ci_if_error: true
handle_no_reports_found: true
continue-on-error: true
- name: Report code coverage (2)
uses: codecov/codecov-action@v4
with:
token: ${{ secrets.CODECOV_TOKEN }}
files: ./.cover/coverage.out
fail_ci_if_error: true
handle_no_reports_found: true
continue-on-error: true
- name: Report code coverage (3)
uses: codecov/codecov-action@v4
with:
token: ${{ secrets.CODECOV_TOKEN }}
files: ./.cover/coverage.out
fail_ci_if_error: true
handle_no_reports_found: true