File tree 3 files changed +43
-0
lines changed
3 files changed +43
-0
lines changed Original file line number Diff line number Diff line change 80
80
# `xarray/tests/__init__.py`.
81
81
python -m pytest --doctest-modules xarray --ignore xarray/tests -Werror
82
82
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
+ continue-on-error : true
121
+ run : |
122
+ python -m pytest --beartype-packages=xarray
123
+
83
124
mypy :
84
125
name : Mypy
85
126
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