Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

CI: 添加 codecov junit result report #3138

Merged
merged 4 commits into from
Nov 23, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 10 additions & 0 deletions .github/workflows/codecov.yml
Original file line number Diff line number Diff line change
Expand Up @@ -48,11 +48,21 @@ jobs:
cd ./envs/${{ matrix.env }}
poetry run bash "../../scripts/run-tests.sh"

- name: Upload test results
uses: codecov/test-results-action@v1
with:
env_vars: OS,PYTHON_VERSION,PYDANTIC_VERSION
files: ./tests/junit.xml
flags: unittests
env:
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}

- name: Upload coverage report
uses: codecov/codecov-action@v5
with:
env_vars: OS,PYTHON_VERSION,PYDANTIC_VERSION
files: ./tests/coverage.xml
flags: unittests
fail_ci_if_error: true
env:
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}
2 changes: 1 addition & 1 deletion scripts/run-tests.sh
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,4 @@
cd "$(dirname "$0")/../tests"

# Run the tests
pytest -n auto --cov-append --cov-report xml $@
pytest -n auto --cov-append --cov-report xml --junitxml=./junit.xml $@