libin
2024-08-20 16:16:56 +08:00
committed by GitHub
parent 34373589ae
commit 6231e924f7
2 changed files with 20 additions and 1 deletions

View File

@@ -37,4 +37,22 @@ jobs:
- name: Upload coverage reports to Codecov
uses: codecov/codecov-action@v4
with:
token: ${{secrets.CODECOV_TOKEN}}
token: ${{secrets.CODECOV_TOKEN}}
# 安装依赖项
- name: Install dependencies
run: |
go install github.com/jstemmer/go-junit-report@latest
go install gotest.tools/gotestsum@latest
# 运行测试并生成覆盖率报告
- name: Run tests and generate coverage report
run: gotestsum --junitfile junit.xml
# 上传测试结果到 Codecov
- name: Upload test results to Codecov
if: ${{ !cancelled() }}
uses: codecov/test-results-action@v1
with:
token: ${{ secrets.CODECOV_TOKEN }}

1
.gitignore vendored
View File

@@ -12,6 +12,7 @@
*.test
coverage.out
coverage.txt
junit.xml
# Output of the go coverage tool, specifically when used with LiteIDE
*.out