@@ -134,6 +134,64 @@ jobs:
134134 name : codecov-umbrella
135135 fail_ci_if_error : false
136136
137+ mypy38 :
138+ name : Mypy 3.8
139+ runs-on : " ubuntu-latest"
140+ needs : detect-ci-trigger
141+ # temporarily skipping due to https://github.com/pydata/xarray/issues/6551
142+ if : needs.detect-ci-trigger.outputs.triggered == 'false'
143+ defaults :
144+ run :
145+ shell : bash -l {0}
146+ env :
147+ CONDA_ENV_FILE : ci/requirements/environment.yml
148+ PYTHON_VERSION : " 3.8"
149+
150+ steps :
151+ - uses : actions/checkout@v3
152+ with :
153+ fetch-depth : 0 # Fetch all history for all branches and tags.
154+
155+ - name : set environment variables
156+ run : |
157+ echo "TODAY=$(date +'%Y-%m-%d')" >> $GITHUB_ENV
158+ - name : Setup micromamba
159+ uses : mamba-org/provision-with-micromamba@v14
160+ with :
161+ environment-file : ${{env.CONDA_ENV_FILE}}
162+ environment-name : xarray-tests
163+ extra-specs : |
164+ python=${{env.PYTHON_VERSION}}
165+ conda
166+ cache-env : true
167+ cache-env-key : " ${{runner.os}}-${{runner.arch}}-py${{env.PYTHON_VERSION}}-${{env.TODAY}}-${{hashFiles(env.CONDA_ENV_FILE)}}"
168+ - name : Install xarray
169+ run : |
170+ python -m pip install --no-deps -e .
171+ - name : Version info
172+ run : |
173+ conda info -a
174+ conda list
175+ python xarray/util/print_versions.py
176+ - name : Install mypy
177+ run : |
178+ python -m pip install 'mypy<0.990'
179+
180+ - name : Run mypy
181+ run : |
182+ python -m mypy --install-types --non-interactive --cobertura-xml-report mypy_report
183+
184+ - name : Upload mypy coverage to Codecov
185+ uses : codecov/codecov-action@v3.1.1
186+ with :
187+ file : mypy_report/cobertura.xml
188+ flags : mypy38
189+ env_vars : PYTHON_VERSION
190+ name : codecov-umbrella
191+ fail_ci_if_error : false
192+
193+
194+
137195 min-version-policy :
138196 name : Minimum Version Policy
139197 runs-on : " ubuntu-latest"
0 commit comments