Skip to content

Commit 5048fcc

Browse files
committed
fix(ci): omit Cython .pxd/.pxi so coverage html can run
Signed-off-by: Rui Luo <ruluo@nvidia.com>
1 parent f687d34 commit 5048fcc

2 files changed

Lines changed: 9 additions & 5 deletions

File tree

.coveragerc

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -11,11 +11,12 @@ plugins = Cython.Coverage
1111
core = ctrace
1212
branch = False
1313
relative_files = True
14-
# Omits specific definition files that causes plugin errors
14+
# Cython.Coverage cannot build a FileReporter for .pxd/.pxi (not standalone
15+
# translation units). Pattern in [run], not an enumeration: a new file of
16+
# either kind otherwise breaks `coverage html`. Must be [run], not [report].
1517
omit =
16-
*/windll.pxd
17-
*/_lib/windll.pxd
18-
*/_lib/utils.pxd
18+
*/*.pxd
19+
*/*.pxi
1920

2021
[report]
2122
show_missing = true

.github/workflows/coverage.yml

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -542,13 +542,16 @@ jobs:
542542
echo "=== Combining coverage data ==="
543543
coverage combine --rcfile=./.coveragerc --keep .coverage.*
544544
545-
# Generate reports
545+
- name: Generate coverage reports
546+
run: |
546547
echo ""
547548
echo "=== Generating HTML, XML, and text reports ==="
548549
coverage html --rcfile=./.coveragerc
549550
coverage xml --rcfile=./.coveragerc -o coverage.xml
550551
coverage report --rcfile=./.coveragerc
551552
553+
- name: Stage coverage artifacts
554+
run: |
552555
# Prepare for upload
553556
mkdir -p ./docs/coverage
554557
mv htmlcov/* ./docs/coverage/

0 commit comments

Comments
 (0)