diff --git a/.github/workflows/coverage.yml b/.github/workflows/coverage.yml index dcbb154..ad8c2dc 100644 --- a/.github/workflows/coverage.yml +++ b/.github/workflows/coverage.yml @@ -44,9 +44,13 @@ jobs: pdm run pytest pdm run coverage xml - name: Upload coverage to Codecov - uses: codecov/codecov-action@v4 + uses: codecov/codecov-action@v5 with: - file: coverage.xml flags: unittests fail_ci_if_error: true token: ${{ secrets.CODECOV_TOKEN }} + - name: Upload test results to Codecov + if: ${{ !cancelled() }} + uses: codecov/test-results-action@v1 + with: + token: ${{ secrets.CODECOV_TOKEN }} diff --git a/pyproject.toml b/pyproject.toml index 4108c50..39bb8d7 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -43,7 +43,7 @@ include-package-data=false [tool.pytest.ini_options] python_functions = "test_*" testpaths = ["tests"] -addopts = "--verbose --cov --retries 2 --retry-delay 5" +addopts = "--verbose --cov --junitxml=junit.xml --retries 2 --retry-delay 5" [tool.coverage.run] source = ["ytmusicapi"]