Skip to content

Commit

Permalink
Add runtime type checking in CI tests
Browse files Browse the repository at this point in the history
This should prevent TYPE_CHECKING misuse.

It might also found issues not found by static type checking,
typically by the current MyPy.
  • Loading branch information
DimitriPapadopoulos committed Nov 7, 2024
1 parent c65b8a6 commit 4b2f732
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 0 deletions.
5 changes: 5 additions & 0 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -126,6 +126,10 @@ jobs:
run: |
python -m pip install pytest-github-actions-annotate-failures
- name: Install beartype
run: |
python -m pip install pytest-beartype
- name: Install xarray
run: |
python -m pip install --no-deps -e .
Expand All @@ -152,6 +156,7 @@ jobs:
--cov=xarray
--cov-report=xml
--junitxml=pytest.xml
--beartype-packages=xarray

- name: Upload test results
if: always()
Expand Down
1 change: 1 addition & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,7 @@ dev = [
"mypy",
"pre-commit",
"pytest",
"pytest-beartype",
"pytest-cov",
"pytest-env",
"pytest-xdist",
Expand Down

0 comments on commit 4b2f732

Please sign in to comment.