@@ -104,114 +104,114 @@ jobs:
104104 cache : true
105105 cache-write : ${{ github.event_name == 'push' && github.ref_name == 'main' }}
106106
107- - name : Set environment variables
108- run : |
109- echo "TODAY=$(date +'%Y-%m-%d')" >> $GITHUB_ENV
110-
111- if [[ ${{ matrix.os }} == windows* ]] ;
112- then
113- if [[ ${{ matrix.python-version }} != "3.14" ]]; then
114- echo "CONDA_ENV_FILE=ci/requirements/environment-windows.yml" >> $GITHUB_ENV
115- else
116- echo "CONDA_ENV_FILE=ci/requirements/environment-windows-3.14.yml" >> $GITHUB_ENV
117- fi
118- elif [[ "${{ matrix.env }}" != "" ]] ;
119- then
120- if [[ "${{ matrix.env }}" == "flaky" ]] ;
121- then
122- echo "CONDA_ENV_FILE=ci/requirements/environment.yml" >> $GITHUB_ENV
123- echo "PYTEST_ADDOPTS=-m 'flaky or network' --run-flaky --run-network-tests -W default" >> $GITHUB_ENV
124- elif [[ "${{ matrix.env }}" == "mypy" ]] ;
125- then
126- echo "CONDA_ENV_FILE=ci/requirements/environment.yml" >> $GITHUB_ENV
127- echo "PYTEST_ADDOPTS=-n 1 -m 'mypy' --run-mypy -W default" >> $GITHUB_ENV
128- else
129- echo "CONDA_ENV_FILE=ci/requirements/${{ matrix.env }}.yml" >> $GITHUB_ENV
130- fi
131- if [[ "${{ matrix.env }}" == "min-all-deps" ]] ;
132- then
133- # Don't raise on warnings
134- echo "PYTEST_ADDOPTS=-W default" >> $GITHUB_ENV
135- fi
136- else
137- if [[ ${{ matrix.python-version }} != "3.14" ]]; then
138- echo "CONDA_ENV_FILE=ci/requirements/environment.yml" >> $GITHUB_ENV
139- else
140- echo "CONDA_ENV_FILE=ci/requirements/environment-3.14.yml" >> $GITHUB_ENV
141- fi
142- fi
143-
144- echo "PYTHON_VERSION=${{ matrix.python-version }}" >> $GITHUB_ENV
145-
146- - name : Setup micromamba
147- uses : mamba-org/setup-micromamba@v2
148- with :
149- environment-file : ${{ env.CONDA_ENV_FILE }}
150- environment-name : xarray-tests
151- cache-environment : true
152- cache-environment-key : " ${{runner.os}}-${{runner.arch}}-py${{matrix.python-version}}-${{env.TODAY}}-${{hashFiles(env.CONDA_ENV_FILE)}}"
153- create-args : >-
154- python=${{matrix.python-version}}
155-
156- # We only want to install this on one run, because otherwise we'll have
157- # duplicate annotations.
158- - name : Install error reporter
159- if : ${{ matrix.os }} == 'ubuntu-latest' and ${{ matrix.python-version }} == '3.12'
160- run : |
161- python -m pip install pytest-github-actions-annotate-failures
162-
163- - name : Install xarray
164- run : |
165- python -m pip install --no-deps -e .
166-
167- - name : Version info
168- run : |
169- python xarray/util/print_versions.py
170-
171- - name : Import xarray
172- run : |
173- python -c "import xarray"
174-
175- - name : Restore cached hypothesis directory
176- uses : actions/cache@v4
177- with :
178- path : .hypothesis/
179- key : cache-hypothesis
180- enableCrossOsArchive : true
181- save-always : true
182-
183- - name : Run tests
184- run : python -m pytest -n ${{ matrix.numprocesses || 4 }}
185- --timeout 180
186- --cov=xarray
187- --cov-report=xml
188- --junitxml=pytest.xml
189-
190- - name : Upload test results
191- if : always()
192- uses : actions/upload-artifact@v4
193- with :
194- name : Test results for ${{ runner.os }}-${{ matrix.python-version }} ${{ matrix.env }}
195- path : pytest.xml
196-
197- - name : Upload code coverage to Codecov
198- uses : codecov/codecov-action@v5.5.1
199- env :
200- CODECOV_TOKEN : ${{ secrets.CODECOV_TOKEN }}
201- with :
202- file : ./coverage.xml
203- flags : unittests
204- env_vars : RUNNER_OS,PYTHON_VERSION
205- name : codecov-umbrella
206- fail_ci_if_error : false
207-
208- event_file :
209- name : " Event File"
210- runs-on : ubuntu-latest
211- if : github.repository == 'pydata/xarray'
212- steps :
213- - name : Upload
214- uses : actions/upload-artifact@v4
215- with :
216- name : Event File
217- path : ${{ github.event_path }}
107+ # - name: Set environment variables
108+ # run: |
109+ # echo "TODAY=$(date +'%Y-%m-%d')" >> $GITHUB_ENV
110+
111+ # if [[ ${{ matrix.os }} == windows* ]] ;
112+ # then
113+ # if [[ ${{ matrix.python-version }} != "3.14" ]]; then
114+ # echo "CONDA_ENV_FILE=ci/requirements/environment-windows.yml" >> $GITHUB_ENV
115+ # else
116+ # echo "CONDA_ENV_FILE=ci/requirements/environment-windows-3.14.yml" >> $GITHUB_ENV
117+ # fi
118+ # elif [[ "${{ matrix.env }}" != "" ]] ;
119+ # then
120+ # if [[ "${{ matrix.env }}" == "flaky" ]] ;
121+ # then
122+ # echo "CONDA_ENV_FILE=ci/requirements/environment.yml" >> $GITHUB_ENV
123+ # echo "PYTEST_ADDOPTS=-m 'flaky or network' --run-flaky --run-network-tests -W default" >> $GITHUB_ENV
124+ # elif [[ "${{ matrix.env }}" == "mypy" ]] ;
125+ # then
126+ # echo "CONDA_ENV_FILE=ci/requirements/environment.yml" >> $GITHUB_ENV
127+ # echo "PYTEST_ADDOPTS=-n 1 -m 'mypy' --run-mypy -W default" >> $GITHUB_ENV
128+ # else
129+ # echo "CONDA_ENV_FILE=ci/requirements/${{ matrix.env }}.yml" >> $GITHUB_ENV
130+ # fi
131+ # if [[ "${{ matrix.env }}" == "min-all-deps" ]] ;
132+ # then
133+ # # Don't raise on warnings
134+ # echo "PYTEST_ADDOPTS=-W default" >> $GITHUB_ENV
135+ # fi
136+ # else
137+ # if [[ ${{ matrix.python-version }} != "3.14" ]]; then
138+ # echo "CONDA_ENV_FILE=ci/requirements/environment.yml" >> $GITHUB_ENV
139+ # else
140+ # echo "CONDA_ENV_FILE=ci/requirements/environment-3.14.yml" >> $GITHUB_ENV
141+ # fi
142+ # fi
143+
144+ # echo "PYTHON_VERSION=${{ matrix.python-version }}" >> $GITHUB_ENV
145+
146+ # - name: Setup micromamba
147+ # uses: mamba-org/setup-micromamba@v2
148+ # with:
149+ # environment-file: ${{ env.CONDA_ENV_FILE }}
150+ # environment-name: xarray-tests
151+ # cache-environment: true
152+ # cache-environment-key: "${{runner.os}}-${{runner.arch}}-py${{matrix.python-version}}-${{env.TODAY}}-${{hashFiles(env.CONDA_ENV_FILE)}}"
153+ # create-args: >-
154+ # python=${{matrix.python-version}}
155+
156+ # # We only want to install this on one run, because otherwise we'll have
157+ # # duplicate annotations.
158+ # - name: Install error reporter
159+ # if: ${{ matrix.os }} == 'ubuntu-latest' and ${{ matrix.python-version }} == '3.12'
160+ # run: |
161+ # python -m pip install pytest-github-actions-annotate-failures
162+
163+ # - name: Install xarray
164+ # run: |
165+ # python -m pip install --no-deps -e .
166+
167+ # - name: Version info
168+ # run: |
169+ # python xarray/util/print_versions.py
170+
171+ # - name: Import xarray
172+ # run: |
173+ # python -c "import xarray"
174+
175+ # - name: Restore cached hypothesis directory
176+ # uses: actions/cache@v4
177+ # with:
178+ # path: .hypothesis/
179+ # key: cache-hypothesis
180+ # enableCrossOsArchive: true
181+ # save-always: true
182+
183+ # - name: Run tests
184+ # run: python -m pytest -n ${{ matrix.numprocesses || 4 }}
185+ # --timeout 180
186+ # --cov=xarray
187+ # --cov-report=xml
188+ # --junitxml=pytest.xml
189+
190+ # - name: Upload test results
191+ # if: always()
192+ # uses: actions/upload-artifact@v4
193+ # with:
194+ # name: Test results for ${{ runner.os }}-${{ matrix.python-version }} ${{ matrix.env }}
195+ # path: pytest.xml
196+
197+ # - name: Upload code coverage to Codecov
198+ # uses: codecov/codecov-action@v5.5.1
199+ # env:
200+ # CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}
201+ # with:
202+ # file: ./coverage.xml
203+ # flags: unittests
204+ # env_vars: RUNNER_OS,PYTHON_VERSION
205+ # name: codecov-umbrella
206+ # fail_ci_if_error: false
207+
208+ # event_file:
209+ # name: "Event File"
210+ # runs-on: ubuntu-latest
211+ # if: github.repository == 'pydata/xarray'
212+ # steps:
213+ # - name: Upload
214+ # uses: actions/upload-artifact@v4
215+ # with:
216+ # name: Event File
217+ # path: ${{ github.event_path }}
0 commit comments