Skip to content

Commit 8df65b3

Browse files
authored
Remove duplicate tests (#6536)
* Remove duplicate tests Merge this in a few days when we know nothing is missing * Add env to cache key
1 parent e0cc051 commit 8df65b3

File tree

6 files changed

+18
-108
lines changed

6 files changed

+18
-108
lines changed

.github/workflows/ci-additional.yaml

Lines changed: 2 additions & 90 deletions
Original file line numberDiff line numberDiff line change
@@ -30,94 +30,6 @@ 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
12133
doctest:
12234
name: Doctests
12335
runs-on: "ubuntu-latest"
@@ -220,5 +132,5 @@ jobs:
220132
- name: minimum versions policy
221133
run: |
222134
mamba install -y pyyaml conda python-dateutil
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
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

.github/workflows/ci.yaml

Lines changed: 12 additions & 14 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 }}
33+
name: ${{ matrix.os }} py${{ matrix.python-version }} ${{ matrix.env }}
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: "py38-bare-minimum"
49-
python-version: 3.8
48+
- env: "bare-minimum"
49+
python-version: "3.8"
5050
os: ubuntu-latest
51-
- env: "py38-min-all-deps"
52-
python-version: 3.8
51+
- env: "min-all-deps"
52+
python-version: "3.8"
5353
os: ubuntu-latest
5454
# Latest python version:
55-
- env: "py39-all-but-dask"
56-
python-version: 3.9
55+
- env: "all-but-dask"
56+
python-version: "3.10"
5757
os: ubuntu-latest
58-
- env: "py39-flaky"
59-
python-version: 3.9
58+
- env: "flaky"
59+
python-version: "3.10"
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 }}" == "py39-flaky" ]] ;
72+
if [[ "${{ matrix.env }}" == "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,8 +88,7 @@ jobs:
8888
uses: actions/cache@v3
8989
with:
9090
path: ~/conda_pkgs_dir
91-
key: ${{ runner.os }}-conda-py${{ matrix.python-version }}-${{
92-
hashFiles('ci/requirements/**.yml') }}
91+
key: ${{ runner.os }}-conda-py${{ matrix.python-version }}-${{ hashFiles('ci/requirements/**.yml') }}-${{ matrix.env }}
9392

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

112110
- name: Install conda dependencies
113111
run: |

ci/requirements/py39-all-but-dask.yml renamed to ci/requirements/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.9
6+
- python=3.10
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/py38-min-all-deps.yml>`_
105+
`<https://github.com/pydata/xarray/blob/main/ci/requirements/min-all-deps.yml>`_
106106

107107
.. _installation-instructions:
108108

0 commit comments

Comments
 (0)