Repository navigation
133 lines (114 loc) · 4.65 KB
/
Copy pathdownstream.yml
File metadata and controls
133 lines (114 loc) · 4.65 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
name: Downstream
on:
workflow_dispatch:
pull_request:
types: [labeled, synchronize, opened, reopened]
permissions:
contents: read
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
jobs:
xarray:
name: Xarray zarr backend tests
if: |
github.event_name == 'workflow_dispatch'
|| contains(github.event.pull_request.labels.*.name, 'run-downstream')
runs-on: ubuntu-latest
steps:
- name: Check out zarr-python
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
with:
fetch-depth: 0
persist-credentials: false
- name: Check out xarray
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
with:
repository: pydata/xarray
path: xarray
persist-credentials: false
# We install xarray with plain pip/uv rather than pixi. pixi solves
# xarray's entire manifest (it has no committed lockfile), which drags in
# the `mypy-upstream` environment; that environment sources numcodecs from
# git and fails to build under newer pixi with
# `meson-python: error: Unknown option "pixi-conda-environment"`, breaking
# the job before any test runs. Tests that need a backend we don't install
# are skipped via xarray's `requires_*` markers, not failed.
- uses: actions/setup-python@5fda3b95a4ea91299a34e894583c3862153e4b97 # v7.0.0
with:
python-version: '3.13'
- name: Install uv
uses: astral-sh/setup-uv@1c37ad07a6a961277cf70c0d37d6f313000f5884 # v10.3.0
- name: Install xarray and test dependencies
working-directory: xarray
run: |
uv venv
# xarray's pytest tooling lives in the PEP 735 `dev` dependency group;
# the zarr-relevant backends come from the `io` and `parallel` extras.
uv pip install --group dev ".[io,parallel,accel]"
- name: Override zarr-python with branch version
working-directory: xarray
run: uv pip install --no-deps ..
# Keep the branch override: syncing xarray would reinstall zarr from PyPI.
- name: Show versions
working-directory: xarray
run: |
uv run --no-sync python -c "
import zarr; print(f'zarr {zarr.__version__}')
import xarray; print(f'xarray {xarray.__version__}')
"
# xarray keeps its backend tests in the `xarray/tests/backends` package
# (pydata/xarray#11633 split the former `test_backends*.py` modules into
# it). Running the package covers the zarr store, region/append, API and
# DataTree tests; the other backends are installed by the `io` extra, so
# their tests run too, as they did before the split.
- name: Run xarray backend tests
working-directory: xarray
run: |
uv run --no-sync python -m pytest --no-header -q \
xarray/tests/backends
numcodecs:
name: numcodecs zarr3 codec tests
if: |
github.event_name == 'workflow_dispatch'
|| contains(github.event.pull_request.labels.*.name, 'run-downstream')
runs-on: ubuntu-latest
steps:
- name: Check out zarr-python
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
with:
fetch-depth: 0
persist-credentials: false
- name: Check out numcodecs
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
with:
repository: zarr-developers/numcodecs
fetch-depth: 0
path: numcodecs
submodules: recursive
persist-credentials: false
- uses: actions/setup-python@5fda3b95a4ea91299a34e894583c3862153e4b97 # v7.0.0
with:
python-version: '3.13'
- name: Install uv
uses: astral-sh/setup-uv@1c37ad07a6a961277cf70c0d37d6f313000f5884 # v10.3.0
- name: Install numcodecs with test-zarr-main group
working-directory: numcodecs
run: |
uv venv
uv pip install --group dev
uv sync --group dev --group test-zarr-main
uv pip install --no-build-isolation -e .
- name: Override zarr-python with branch version
working-directory: numcodecs
run: uv pip install --no-deps ..
- name: Show versions
working-directory: numcodecs
run: |
uv run python -c "
import zarr; print(f'zarr {zarr.__version__}')
import numcodecs; print(f'numcodecs {numcodecs.__version__}')
"
- name: Run numcodecs zarr3 tests
working-directory: numcodecs
run: uv run python -m pytest -x --no-header -q tests/test_zarr3.py