Skip to content

Commit

Permalink
Merge pull request #643 from bioimage-io/coverage
Browse files Browse the repository at this point in the history
add code coverage for py3.12 tests
  • Loading branch information
FynnBe authored Oct 28, 2024
2 parents 60c549e + 5236323 commit 7e6a274
Show file tree
Hide file tree
Showing 4 changed files with 16 additions and 2 deletions.
8 changes: 8 additions & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,14 @@ jobs:
- run: pyright --version
- run: pyright -p pyproject.toml --pythonversion ${{ matrix.python-version }}
- run: pytest
- run: ls coverage.xml
- if: matrix.python-version == '3.12' && github.event_name == 'pull_request'
uses: orgoro/[email protected]
with:
coverageFile: coverage.xml
token: ${{ secrets.GITHUB_TOKEN }}



deploy:
runs-on: ubuntu-latest
Expand Down
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ typeCheckingMode = "strict"
useLibraryCodeForTypes = true

[tool.pytest.ini_options]
addopts = "-n auto --capture=no --failed-first" # --doctest-modules
addopts = "--cov=bioimageio --cov-report=xml -n auto --capture=no --failed-first" # --doctest-modules
testpaths = ["bioimageio/spec", "tests", "scripts"]

[tool.ruff]
Expand Down
1 change: 1 addition & 0 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,7 @@
"pre-commit",
"psutil", # parallel pytest with '-n auto'
"pyright==1.1.378",
"pytest-cov",
"pytest-xdist", # parallel pytest
"pytest",
"python-devtools",
Expand Down
7 changes: 6 additions & 1 deletion tests/test_generic/test_v0_2.py
Original file line number Diff line number Diff line change
Expand Up @@ -167,7 +167,12 @@
],
)
def test_node(node_class: Type[Node], kwargs: Dict[str, Any], is_valid: bool):
check_node(node_class, kwargs, is_invalid=not is_valid)
check_node(
node_class,
kwargs,
is_invalid=not is_valid,
context=ValidationContext(perform_io_checks=True),
)


def test_deprecated_license_in_generic():
Expand Down

0 comments on commit 7e6a274

Please sign in to comment.