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