From f7574237be41da9753a82c77aa15f1ab3bf8371e Mon Sep 17 00:00:00 2001 From: sigma67 Date: Thu, 19 Dec 2024 16:53:15 +0100 Subject: [PATCH] add test analytics --- .github/workflows/coverage.yml | 8 ++++++-- pyproject.toml | 2 +- 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/.github/workflows/coverage.yml b/.github/workflows/coverage.yml index dcbb1543..ad8c2dc0 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 4108c504..39bb8d73 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"]