diff --git a/.github/workflows/pythonpackage.yml b/.github/workflows/pythonpackage.yml index 760530182..850cb57c0 100644 --- a/.github/workflows/pythonpackage.yml +++ b/.github/workflows/pythonpackage.yml @@ -1,6 +1,11 @@ name: Python package -on: [workflow_dispatch, pull_request] +on: + push: + branches: + - master + pull_request: + workflow_dispatch: jobs: python-check: @@ -29,10 +34,12 @@ jobs: poetry ci shell: bash - name: Upload coverage to Codecov - if: runner.os == 'Linux' uses: codecov/codecov-action@v5 with: token: ${{ secrets.CODECOV_TOKEN }} - files: ./coverage.xml - flags: unittests - name: codecov-umbrella + - name: Upload test results to Codecov + uses: codecov/codecov-action@v5 + if: ${{ !cancelled() }} + with: + token: ${{ secrets.CODECOV_TOKEN }} + report_type: test_results diff --git a/.gitignore b/.gitignore index be07cf2d9..fb467da46 100644 --- a/.gitignore +++ b/.gitignore @@ -46,6 +46,7 @@ coverage.xml *.cover .hypothesis/ .pytest_cache +junit.xml # Translations *.mo diff --git a/pyproject.toml b/pyproject.toml index 7b5c5d35a..76896d350 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -265,7 +265,7 @@ test.cmd = "pytest -n 3 --dist=loadfile" "test:all".cmd = "tox --parallel" cover.help = "Run the test suite with coverage" -cover.ref = "test --cov-report term-missing --cov-report=xml:coverage.xml --cov=commitizen" +cover.ref = "test --cov-report term-missing --cov-report=xml:coverage.xml --cov=commitizen --junitxml=junit.xml -o junit_family=legacy" all.help = "Run all tasks" all.sequence = ["format", "lint", "check-commit", "cover"]