Skip to content

Commit

Permalink
chore: coverage report is handled by pytest-cov by default
Browse files Browse the repository at this point in the history
  • Loading branch information
Aidan Griffiths committed Nov 2, 2023
1 parent cf531a4 commit 27997e1
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 9 deletions.
10 changes: 4 additions & 6 deletions .github/workflows/python-app.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,15 +29,13 @@ jobs:
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install pytest
pip install .[all]
- name: Test with pytest
run: |
pip install pytest pytest-cov
coverage run -m pytest
- name: Report test coverage
run: |
coverage report -m
# editable is necessary as pytest will run against the installed
# package rather than the local files creating a coverage report of 0%
pip install -e .
pytest tests/ --cov=src/
- name: Test tutorial notebooks with pytest
run: |
pytest --nbmake tutorials/
4 changes: 1 addition & 3 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -86,11 +86,9 @@ source = ["/src/"]

[tool.pytest.ini_options]
addopts = [
'--cov-fail-under=100',
'--cov-fail-under=99',
'--cov-branch',
'--cov-report=html',
'--cov-report=term-missing',
'--junitxml=report.xml',
# Ignore notebooks which depend on external data for E2E tests
'--ignore=tutorials/First_Data_Fetching.ipynb',
'--ignore=tutorials/Mean_Squared_Error.ipynb',
Expand Down

0 comments on commit 27997e1

Please sign in to comment.