-
-
Notifications
You must be signed in to change notification settings - Fork 423
129 lines (110 loc) · 4.29 KB
/
Copy pathdownstream.yml
File metadata and controls
129 lines (110 loc) · 4.29 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
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@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0
with:
fetch-depth: 0
persist-credentials: false
- name: Check out xarray
uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0
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@a309ff8b426b58ec0e2a45f0f869d46889d02405 # v6.2.0
with:
python-version: '3.13'
- name: Install uv
uses: astral-sh/setup-uv@fac544c07dec837d0ccb6301d7b5580bf5edae39 # v8.2.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 ..
- name: Show versions
working-directory: xarray
run: |
uv run python -c "
import zarr; print(f'zarr {zarr.__version__}')
import xarray; print(f'xarray {xarray.__version__}')
"
- name: Run xarray zarr backend tests
working-directory: xarray
run: |
uv run python -m pytest --no-header -q \
xarray/tests/test_backends.py \
xarray/tests/test_backends_api.py \
xarray/tests/test_backends_datatree.py
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@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0
with:
fetch-depth: 0
persist-credentials: false
- name: Check out numcodecs
uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0
with:
repository: zarr-developers/numcodecs
fetch-depth: 0
path: numcodecs
submodules: recursive
persist-credentials: false
- uses: actions/setup-python@a309ff8b426b58ec0e2a45f0f869d46889d02405 # v6.2.0
with:
python-version: '3.13'
- name: Install uv
uses: astral-sh/setup-uv@fac544c07dec837d0ccb6301d7b5580bf5edae39 # v8.2.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