diff --git a/.github/workflows/codecov.yml b/.github/workflows/codecov.yml index f0a71c2..269fd29 100644 --- a/.github/workflows/codecov.yml +++ b/.github/workflows/codecov.yml @@ -47,6 +47,13 @@ jobs: - name: Run tests run: uv run poe test + - name: Upload test results to Codecov + if: ${{ !cancelled() }} + uses: codecov/test-results-action@v1 + with: + token: ${{ secrets.CODECOV_TOKEN }} + env_vars: OS,PYTHON_VERSION + - name: Upload coverage to Codecov uses: codecov/codecov-action@v5 with: diff --git a/.gitignore b/.gitignore index 0a0c798..52a4d54 100644 --- a/.gitignore +++ b/.gitignore @@ -55,6 +55,7 @@ coverage.xml .hypothesis/ .pytest_cache/ pytestdebug.log +junit.xml # Translations *.mo diff --git a/pyproject.toml b/pyproject.toml index ddc0f24..0d3ff83 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -57,7 +57,7 @@ dev = [ universal = true [tool.poe.tasks] -test = "pytest --cov=nonebot_plugin_user --cov-report xml -n auto -v" +test = "pytest --cov=nonebot_plugin_user --cov-report xml --junitxml=./junit.xml -n auto -v" bump = "bump-my-version bump" show-bump = "bump-my-version show-bump"