We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
upload_coverage_report.yml
1 parent db7c875 commit ea26922Copy full SHA for ea26922
.github/workflows/upload_coverage_report.yml
@@ -0,0 +1,31 @@
1
+---
2
+name: upload_coverage_report
3
+
4
+on:
5
+ workflow_dispatch:
6
+ push:
7
+ branches:
8
+ - master
9
+ pull_request:
10
11
+env:
12
+ REPORT_NAME: "coverage.out"
13
14
+jobs:
15
+ upload_coverage_report:
16
+ runs-on: ubuntu-latest
17
+ steps:
18
+ - uses: actions/checkout@v4
19
+ - name: Setup Go
20
+ uses: actions/setup-go@v4
21
+ with:
22
+ go-version: '^1.18'
23
+ - name: Generate code coverage
24
+ run: |
25
+ go test -coverprofile="${{ env.REPORT_NAME }}" ./...
26
+ - name: Upload coverage to codecov
27
+ uses: codecov/codecov-action@v3
28
29
+ files: "${{ env.REPORT_NAME }}"
30
+ fail_ci_if_error: true
31
+...
.gitignore
@@ -1,2 +1,3 @@
.idea/
.vscode/
+coverage.out
0 commit comments