Skip to content

Commit e653a64

Browse files
authored
Revert "Remove duplicate tests (#6536)"
This reverts commit 8df65b3.
1 parent 8df65b3 commit e653a64

File tree

6 files changed

+108
-18
lines changed

6 files changed

+108
-18
lines changed

.github/workflows/ci-additional.yaml

Lines changed: 90 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,94 @@ jobs:
3030
with:
3131
keyword: "[skip-ci]"
3232

33+
# This job is deprecated and can be removed soon. It's still here in case the
34+
# move consolidate with `ci.yaml` missed something which the existing test
35+
# picks up.
36+
test:
37+
name: ${{ matrix.os }} ${{ matrix.env }}
38+
runs-on: ${{ matrix.os }}
39+
needs: detect-ci-trigger
40+
if: needs.detect-ci-trigger.outputs.triggered == 'false'
41+
defaults:
42+
run:
43+
shell: bash -l {0}
44+
strategy:
45+
fail-fast: false
46+
matrix:
47+
os: ["ubuntu-latest"]
48+
env: [
49+
# Minimum python version:
50+
"py38-bare-minimum",
51+
"py38-min-all-deps",
52+
53+
# Latest python version:
54+
"py39-all-but-dask",
55+
"py39-flaky",
56+
]
57+
steps:
58+
- uses: actions/checkout@v3
59+
with:
60+
fetch-depth: 0 # Fetch all history for all branches and tags.
61+
62+
- name: Set environment variables
63+
run: |
64+
if [[ ${{ matrix.env }} == "py39-flaky" ]] ;
65+
then
66+
echo "CONDA_ENV_FILE=ci/requirements/environment.yml" >> $GITHUB_ENV
67+
echo "PYTEST_EXTRA_FLAGS=--run-flaky --run-network-tests" >> $GITHUB_ENV
68+
69+
else
70+
echo "CONDA_ENV_FILE=ci/requirements/${{ matrix.env }}.yml" >> $GITHUB_ENV
71+
fi
72+
73+
- name: Cache conda
74+
uses: actions/cache@v3
75+
with:
76+
path: ~/conda_pkgs_dir
77+
key: ${{ runner.os }}-conda-${{ matrix.env }}-${{
78+
hashFiles('ci/requirements/**.yml') }}
79+
80+
- uses: conda-incubator/setup-miniconda@v2
81+
with:
82+
channels: conda-forge
83+
channel-priority: strict
84+
mamba-version: "*"
85+
activate-environment: xarray-tests
86+
auto-update-conda: false
87+
python-version: 3.9
88+
use-only-tar-bz2: true
89+
90+
- name: Install conda dependencies
91+
run: |
92+
mamba env update -f $CONDA_ENV_FILE
93+
94+
- name: Install xarray
95+
run: |
96+
python -m pip install --no-deps -e .
97+
98+
- name: Version info
99+
run: |
100+
conda info -a
101+
conda list
102+
python xarray/util/print_versions.py
103+
- name: Import xarray
104+
run: |
105+
python -c "import xarray"
106+
- name: Run tests
107+
run: |
108+
python -m pytest -n 4 \
109+
--cov=xarray \
110+
--cov-report=xml \
111+
$PYTEST_EXTRA_FLAGS
112+
113+
- name: Upload code coverage to Codecov
114+
uses: codecov/[email protected]
115+
with:
116+
file: ./coverage.xml
117+
flags: unittests,${{ matrix.env }}
118+
env_vars: RUNNER_OS
119+
name: codecov-umbrella
120+
fail_ci_if_error: false
33121
doctest:
34122
name: Doctests
35123
runs-on: "ubuntu-latest"
@@ -132,5 +220,5 @@ jobs:
132220
- name: minimum versions policy
133221
run: |
134222
mamba install -y pyyaml conda python-dateutil
135-
python ci/min_deps_check.py ci/requirements/bare-minimum.yml
136-
python ci/min_deps_check.py ci/requirements/min-all-deps.yml
223+
python ci/min_deps_check.py ci/requirements/py38-bare-minimum.yml
224+
python ci/min_deps_check.py ci/requirements/py38-min-all-deps.yml

.github/workflows/ci.yaml

Lines changed: 14 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ jobs:
3030
with:
3131
keyword: "[skip-ci]"
3232
test:
33-
name: ${{ matrix.os }} py${{ matrix.python-version }} ${{ matrix.env }}
33+
name: ${{ matrix.os }} py${{ matrix.python-version }}
3434
runs-on: ${{ matrix.os }}
3535
needs: detect-ci-trigger
3636
if: needs.detect-ci-trigger.outputs.triggered == 'false'
@@ -45,18 +45,18 @@ jobs:
4545
python-version: ["3.8", "3.10"]
4646
include:
4747
# Minimum python version:
48-
- env: "bare-minimum"
49-
python-version: "3.8"
48+
- env: "py38-bare-minimum"
49+
python-version: 3.8
5050
os: ubuntu-latest
51-
- env: "min-all-deps"
52-
python-version: "3.8"
51+
- env: "py38-min-all-deps"
52+
python-version: 3.8
5353
os: ubuntu-latest
5454
# Latest python version:
55-
- env: "all-but-dask"
56-
python-version: "3.10"
55+
- env: "py39-all-but-dask"
56+
python-version: 3.9
5757
os: ubuntu-latest
58-
- env: "flaky"
59-
python-version: "3.10"
58+
- env: "py39-flaky"
59+
python-version: 3.9
6060
os: ubuntu-latest
6161
steps:
6262
- uses: actions/checkout@v3
@@ -69,7 +69,7 @@ jobs:
6969
echo "CONDA_ENV_FILE=ci/requirements/environment-windows.yml" >> $GITHUB_ENV
7070
elif [[ "${{ matrix.env }}" != "" ]] ;
7171
then
72-
if [[ "${{ matrix.env }}" == "flaky" ]] ;
72+
if [[ "${{ matrix.env }}" == "py39-flaky" ]] ;
7373
then
7474
echo "CONDA_ENV_FILE=ci/requirements/environment.yml" >> $GITHUB_ENV
7575
echo "PYTEST_EXTRA_FLAGS=--run-flaky --run-network-tests" >> $GITHUB_ENV
@@ -88,7 +88,8 @@ jobs:
8888
uses: actions/cache@v3
8989
with:
9090
path: ~/conda_pkgs_dir
91-
key: ${{ runner.os }}-conda-py${{ matrix.python-version }}-${{ hashFiles('ci/requirements/**.yml') }}-${{ matrix.env }}
91+
key: ${{ runner.os }}-conda-py${{ matrix.python-version }}-${{
92+
hashFiles('ci/requirements/**.yml') }}
9293

9394
- uses: conda-incubator/setup-miniconda@v2
9495
with:
@@ -105,7 +106,8 @@ jobs:
105106
uses: actions/cache@v3
106107
with:
107108
path: /usr/share/miniconda/envs/xarray-tests
108-
key: ${{ runner.os }}-conda-py${{ matrix.python-version }}-${{ hashFiles('ci/requirements/**.yml') }}-${{ matrix.env }}
109+
key: ${{ runner.os }}-conda-py${{ matrix.python-version }}-${{
110+
hashFiles('ci/requirements/**.yml') }}
109111

110112
- name: Install conda dependencies
111113
run: |

ci/requirements/all-but-dask.yml renamed to ci/requirements/py39-all-but-dask.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ channels:
33
- conda-forge
44
- nodefaults
55
dependencies:
6-
- python=3.10
6+
- python=3.9
77
- black
88
- aiobotocore
99
- boto3
@@ -17,7 +17,7 @@ dependencies:
1717
- h5py
1818
- hdf5
1919
- hypothesis
20-
- lxml # Optional dep of pydap
20+
- lxml # Optional dep of pydap
2121
- matplotlib-base
2222
- nc-time-axis
2323
- netcdf4
@@ -42,4 +42,4 @@ dependencies:
4242
- typing_extensions
4343
- zarr
4444
- pip:
45-
- numbagg
45+
- numbagg

doc/getting-started-guide/installing.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -102,7 +102,7 @@ release is guaranteed to work.
102102

103103
You can see the actual minimum tested versions:
104104

105-
`<https://github.com/pydata/xarray/blob/main/ci/requirements/min-all-deps.yml>`_
105+
`<https://github.com/pydata/xarray/blob/main/ci/requirements/py38-min-all-deps.yml>`_
106106

107107
.. _installation-instructions:
108108

0 commit comments

Comments
 (0)