Skip to content

Commit

Permalink
73: update .toml to enable pytest-cov report
Browse files Browse the repository at this point in the history
  • Loading branch information
John-Sharples authored and tennlee committed Oct 17, 2023
1 parent 7614b23 commit fb5b160
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 4 deletions.
10 changes: 6 additions & 4 deletions .github/workflows/python-app.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,9 @@ name: Unit Tests

on:
push:
branches: ["develop", "main"]
branches: ["develop", "main", "[0-9]+-*"]
pull_request:
branches: ["develop", "main"]
branches: ["develop", "main", "[0-9]+-*"]

permissions:
contents: read
Expand All @@ -34,5 +34,7 @@ jobs:
- name: Test with pytest
run: |
pip install pytest pytest-cov
pytest --cov-report html --cov=src --junitxml=junit/test-results.xml --junitxml=junit/test-results.xml
coverage run -m pytest
- name: Report test coverage
run: |
coverage report -m
12 changes: 12 additions & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@ dev = [
"mypy == 1.3.0",
"pylint == 2.17.4",
"dask",
"h5netcdf",
"pandas-stubs"
]
tutorial = [
Expand Down Expand Up @@ -78,3 +79,14 @@ warn_unused_configs = true

[[tool.mypy.overrides]]
ignore_missing_imports = true

[tool.coverage.paths]
source = ["/src/"]

[tool.pytest.ini_options]
addopts = [
'--cov-fail-under=98',
'--cov-report=html',
'--cov-report=term-missing',
'--junitxml=report.xml'
]

0 comments on commit fb5b160

Please sign in to comment.