Repository navigation
157 lines (148 loc) · 4.96 KB
/
Copy pathzarr-http-server.yml
File metadata and controls
157 lines (148 loc) · 4.96 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
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
name: zarr-http-server
# Job steps delegate to packages/zarr-http-server/justfile, the single source
# of truth for this package's verbs; CI owns only the python matrix and
# caching. Keeping the commands in one place is what makes `just check`
# locally mean the same thing as a green run here.
on:
push:
branches: [main]
paths:
- 'packages/zarr-http-server/**'
- '.github/workflows/zarr-http-server.yml'
# The docs config and header script shared by all package sites.
- 'packages/mkdocs-base.yml'
- 'packages/source-version.js'
# The package resolves zarr from the repo root for its own tests, so a
# core change can break it. Run this suite when core changes too.
- 'src/zarr/**'
pull_request:
paths:
- 'packages/zarr-http-server/**'
- '.github/workflows/zarr-http-server.yml'
# The docs config and header script shared by all package sites.
- 'packages/mkdocs-base.yml'
- 'packages/source-version.js'
# The package resolves zarr from the repo root for its own tests, so a
# core change can break it. Run this suite when core changes too.
- 'src/zarr/**'
workflow_dispatch:
permissions:
contents: read
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
jobs:
test:
name: pytest py=${{ matrix.python-version }}
runs-on: ubuntu-latest
defaults:
run:
shell: bash
working-directory: packages/zarr-http-server
strategy:
fail-fast: false
matrix:
python-version: ['3.12', '3.13', '3.14']
steps:
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
with:
persist-credentials: false
- name: Install uv
uses: astral-sh/setup-uv@1c37ad07a6a961277cf70c0d37d6f313000f5884 # v10.3.0
with:
enable-cache: true
- name: Set up Python ${{ matrix.python-version }}
run: uv python install ${{ matrix.python-version }}
- name: Install just
uses: extractions/setup-crate@7577c1bdf2d95e6d65d532788f35ed79d4b1dda2 # v2.0.1
with:
repo: casey/just
version: 1.58.0
- name: Sync test dependency groups
# The examples group carries the deps the README examples need, so the
# test that reads a served array back with a zarr client runs here
# instead of silently skipping.
run: uv sync --group test --group examples --python ${{ matrix.python-version }}
- name: Run pytest
run: just test
ruff:
name: ruff
runs-on: ubuntu-latest
defaults:
run:
shell: bash
working-directory: packages/zarr-http-server
steps:
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
with:
persist-credentials: false
- name: Install uv
uses: astral-sh/setup-uv@1c37ad07a6a961277cf70c0d37d6f313000f5884 # v10.3.0
- name: Install just
uses: extractions/setup-crate@7577c1bdf2d95e6d65d532788f35ed79d4b1dda2 # v2.0.1
with:
repo: casey/just
version: 1.58.0
- name: Run ruff
run: just lint
mypy:
name: mypy
runs-on: ubuntu-latest
defaults:
run:
shell: bash
working-directory: packages/zarr-http-server
steps:
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
with:
persist-credentials: false
- name: Install uv
uses: astral-sh/setup-uv@1c37ad07a6a961277cf70c0d37d6f313000f5884 # v10.3.0
with:
enable-cache: true
- name: Set up Python
run: uv python install 3.12
- name: Install just
uses: extractions/setup-crate@7577c1bdf2d95e6d65d532788f35ed79d4b1dda2 # v2.0.1
with:
repo: casey/just
version: 1.58.0
- name: Sync test dependency group
run: uv sync --group test --python 3.12
- name: Run mypy
run: just typecheck
docs:
name: docs
runs-on: ubuntu-latest
defaults:
run:
shell: bash
working-directory: packages/zarr-http-server
steps:
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
with:
persist-credentials: false
- name: Install uv
uses: astral-sh/setup-uv@1c37ad07a6a961277cf70c0d37d6f313000f5884 # v10.3.0
with:
enable-cache: true
- name: Install just
uses: extractions/setup-crate@7577c1bdf2d95e6d65d532788f35ed79d4b1dda2 # v2.0.1
with:
repo: casey/just
version: 1.58.0
- name: Build docs
run: just docs-check
zarr-http-server-complete:
name: zarr-http-server complete
needs: [test, ruff, mypy, docs]
if: always()
runs-on: ubuntu-latest
steps:
- name: Check failure
if: |
contains(needs.*.result, 'failure') ||
contains(needs.*.result, 'cancelled')
run: exit 1
- name: Success
run: echo Success!