Skip to content

Commit b92d3ea

Browse files
committed
ci(coverage): restore builds on master, fix Codecov coverage report and adds test analytics (fix #1606)
1 parent 98321b1 commit b92d3ea

File tree

3 files changed

+14
-6
lines changed

3 files changed

+14
-6
lines changed

.github/workflows/pythonpackage.yml

Lines changed: 12 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,11 @@
11
name: Python package
22

3-
on: [workflow_dispatch, pull_request]
3+
on:
4+
push:
5+
branches:
6+
- master
7+
pull_request:
8+
workflow_dispatch:
49

510
jobs:
611
python-check:
@@ -29,10 +34,12 @@ jobs:
2934
poetry ci
3035
shell: bash
3136
- name: Upload coverage to Codecov
32-
if: runner.os == 'Linux'
3337
uses: codecov/codecov-action@v5
3438
with:
3539
token: ${{ secrets.CODECOV_TOKEN }}
36-
files: ./coverage.xml
37-
flags: unittests
38-
name: codecov-umbrella
40+
- name: Upload test results to Codecov
41+
uses: codecov/codecov-action@v5
42+
if: ${{ !cancelled() }}
43+
with:
44+
token: ${{ secrets.CODECOV_TOKEN }}
45+
report_type: test_results

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,7 @@ coverage.xml
4646
*.cover
4747
.hypothesis/
4848
.pytest_cache
49+
junit.xml
4950

5051
# Translations
5152
*.mo

pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -265,7 +265,7 @@ test.cmd = "pytest -n 3 --dist=loadfile"
265265
"test:all".cmd = "tox --parallel"
266266

267267
cover.help = "Run the test suite with coverage"
268-
cover.ref = "test --cov-report term-missing --cov-report=xml:coverage.xml --cov=commitizen"
268+
cover.ref = "test --cov-report term-missing --cov-report=xml:coverage.xml --cov=commitizen --junitxml=junit.xml -o junit_family=legacy"
269269

270270
all.help = "Run all tasks"
271271
all.sequence = ["format", "lint", "check-commit", "cover"]

0 commit comments

Comments
 (0)