Skip to content

Commit

Permalink
Add test coverage
Browse files Browse the repository at this point in the history
  • Loading branch information
pvandyken committed Dec 18, 2023
1 parent 80ed72d commit 8fb4124
Show file tree
Hide file tree
Showing 4 changed files with 114 additions and 11 deletions.
9 changes: 9 additions & 0 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -76,9 +76,18 @@ jobs:
HYPOTHESIS_PROFILE: pr
run: >-
poetry run pytest -n auto --splits 5 --group ${{ matrix.split }}
--cov=snakebids --cov-report=xml
--doctest-modules --ignore=docs
--ignore=snakebids/project_template --benchmark-disable
- name: Upload coverage reports to Codecov
uses: codecov/codecov-action@v3
with:
verbose: true
env:
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}


deployment_on_base:
runs-on: ubuntu-latest
if: ${{ contains(github.event_name, 'pull_request') }}
Expand Down
6 changes: 6 additions & 0 deletions codecov.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
coverage:
status:
project:
default:
target: auto
threshold: 0%
97 changes: 86 additions & 11 deletions poetry.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

13 changes: 13 additions & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -86,6 +86,7 @@ pytest-xdist = "^3.3.1"
pytest-split = "^0.8.1"
tomli = "^2.0.1"
requests-mock = "^1.11.0"
pytest-cov = "^4.1.0"

[tool.poetry.scripts]
snakebids = "snakebids.admin:main"
Expand Down Expand Up @@ -123,6 +124,18 @@ markers = [
"docker: marks tests as requiring docker (deselect with '-m \"not docker\"')",
]

[tool.coverage.run]
omit = [
"snakebids/project_template/**",
"snakebids/tests/**",
]

[tool.coverage.report]
exclude_lines = [
"pragma: not covered",
"@overload",
]

[tool.isort]
profile = "black"
multi_line_output = 3
Expand Down

0 comments on commit 8fb4124

Please sign in to comment.