File tree Expand file tree Collapse file tree 3 files changed +44
-0
lines changed
Expand file tree Collapse file tree 3 files changed +44
-0
lines changed Original file line number Diff line number Diff line change 8080 # `xarray/tests/__init__.py`.
8181 python -m pytest --doctest-modules xarray --ignore xarray/tests -Werror
8282
83+ beartype :
84+ name : beartype
85+ runs-on : " ubuntu-latest"
86+ needs : detect-ci-trigger
87+ defaults :
88+ run :
89+ shell : bash -l {0}
90+ env :
91+ CONDA_ENV_FILE : ci/requirements/environment.yml
92+ PYTHON_VERSION : " 3.12"
93+
94+ steps :
95+ - uses : actions/checkout@v4
96+ with :
97+ fetch-depth : 0 # Fetch all history for all branches and tags.
98+
99+ - name : set environment variables
100+ run : |
101+ echo "TODAY=$(date +'%Y-%m-%d')" >> $GITHUB_ENV
102+ - name : Setup micromamba
103+ uses : mamba-org/setup-micromamba@v2
104+ with :
105+ micromamba-version : ${{env.MICROMAMBA_VERSION}}
106+ environment-file : ${{env.CONDA_ENV_FILE}}
107+ environment-name : xarray-tests
108+ create-args : >-
109+ python=${{env.PYTHON_VERSION}}
110+ cache-environment : true
111+ cache-environment-key : " ${{runner.os}}-${{runner.arch}}-py${{env.PYTHON_VERSION}}-${{env.TODAY}}-${{hashFiles(env.CONDA_ENV_FILE)}}"
112+ - name : Install xarray
113+ run : |
114+ python -m pip install --no-deps -e .
115+ - name : Version info
116+ run : |
117+ python xarray/util/print_versions.py
118+
119+ - name : Run beartype
120+ run : |
121+ python -m pytest --beartype-packages=xarray
122+ with :
123+ fail_ci_if_error : false
124+
83125 mypy :
84126 name : Mypy
85127 runs-on : " ubuntu-latest"
Original file line number Diff line number Diff line change @@ -38,6 +38,7 @@ dependencies:
3838 - pydap
3939 - pydap-server
4040 - pytest
41+ - pytest-beartype
4142 - pytest-cov
4243 - pytest-env
4344 - pytest-xdist
Original file line number Diff line number Diff line change @@ -41,6 +41,7 @@ dev = [
4141 " mypy" ,
4242 " pre-commit" ,
4343 " pytest" ,
44+ " pytest-beartype" ,
4445 " pytest-cov" ,
4546 " pytest-env" ,
4647 " pytest-xdist" ,
You can’t perform that action at this time.
0 commit comments