Skip to content

Commit 25689ec

Browse files
authored
Add pytest-cov dependency and dedicated coverage CI job with artifact upload
1 parent 954171d commit 25689ec

2 files changed

Lines changed: 23 additions & 0 deletions

File tree

.github/workflows/CI.yml

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -203,6 +203,28 @@ jobs:
203203
pip install pytest
204204
pytest
205205
206+
coverage:
207+
runs-on: ubuntu-latest
208+
steps:
209+
- uses: actions/checkout@v4
210+
- uses: actions/setup-python@v5
211+
with:
212+
python-version: "3.12"
213+
- name: Build and install package
214+
uses: PyO3/maturin-action@v1
215+
with:
216+
command: develop
217+
args: --release
218+
- name: Install test dependencies
219+
run: pip install -e ".[test]"
220+
- name: Run coverage
221+
run: pytest --cov=e57 --cov-report=term-missing --cov-report=xml
222+
- name: Upload coverage artifact
223+
uses: actions/upload-artifact@v4
224+
with:
225+
name: coverage-xml
226+
path: coverage.xml
227+
206228
sdist:
207229
runs-on: ubuntu-latest
208230
steps:

pyproject.toml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,7 @@ classifiers = [
2626
[project.optional-dependencies]
2727
test = [
2828
'pytest>=9,<10',
29+
'pytest-cov>=5,<7',
2930
]
3031

3132
[project.urls]

0 commit comments

Comments
 (0)