-
Notifications
You must be signed in to change notification settings - Fork 13
175 lines (147 loc) · 5.93 KB
/
Copy pathtest.yml
File metadata and controls
175 lines (147 loc) · 5.93 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
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
name: Test
on:
push:
branches: [main, modular-viscy-staging]
pull_request:
branches: [main, modular-viscy-staging]
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: ${{ startsWith(github.ref, 'refs/pull/') }}
jobs:
test:
name: Test (${{ matrix.package }}, Python ${{ matrix.python-version }}, ${{ matrix.os }})
runs-on: ${{ matrix.os }}
strategy:
fail-fast: true
matrix:
os: [ubuntu-latest, macos-latest, windows-latest]
python-version: ["3.12", "3.13"]
package: [viscy-transforms, viscy-models]
steps:
- name: Checkout repository
uses: actions/checkout@v5
- name: Set up uv with Python ${{ matrix.python-version }}
uses: astral-sh/setup-uv@v7
with:
python-version: ${{ matrix.python-version }}
enable-cache: true
cache-suffix: ${{ matrix.os }}-${{ matrix.python-version }}
- name: Install dependencies
run: uv sync --frozen --all-extras --dev
working-directory: packages/${{ matrix.package }}
- name: Run tests with coverage
run: uv run --frozen pytest --cov=src/ --cov-report=term-missing
working-directory: packages/${{ matrix.package }}
test-data:
name: Test Data (Python ${{ matrix.python-version }}, ${{ matrix.os }})
runs-on: ${{ matrix.os }}
strategy:
fail-fast: true
matrix:
os: [ubuntu-latest, macos-latest, windows-latest]
python-version: ["3.12", "3.13"]
steps:
- name: Checkout repository
uses: actions/checkout@v5
- name: Set up uv with Python ${{ matrix.python-version }}
uses: astral-sh/setup-uv@v7
with:
python-version: ${{ matrix.python-version }}
enable-cache: true
cache-suffix: ${{ matrix.os }}-${{ matrix.python-version }}
- name: Install dependencies
run: uv sync --frozen --all-extras --dev
working-directory: packages/viscy-data
- name: Run tests with coverage
run: uv run --frozen pytest --cov=viscy_data --cov-report=term-missing
working-directory: packages/viscy-data
test-data-extras:
name: Test Data Extras (Python 3.13, ubuntu-latest)
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v5
- name: Set up uv with Python 3.13
uses: astral-sh/setup-uv@v7
with:
python-version: "3.13"
enable-cache: true
cache-suffix: ubuntu-latest-3.13
- name: Install dependencies
run: uv sync --frozen --all-extras --dev
working-directory: packages/viscy-data
- name: Run tests with coverage
run: uv run --frozen pytest --cov=viscy_data --cov-report=term-missing
working-directory: packages/viscy-data
test-applications:
name: Test (${{ matrix.application }}, Python 3.13, ubuntu-latest)
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
application: [dynaclr, cytoland, airtable, qc]
steps:
- name: Checkout repository
uses: actions/checkout@v5
- name: Set up uv with Python 3.13
uses: astral-sh/setup-uv@v7
with:
python-version: "3.13"
enable-cache: true
cache-suffix: ubuntu-latest-3.13
- name: Install dependencies
run: uv sync --frozen --all-extras --dev
working-directory: applications/${{ matrix.application }}
- name: Run tests
run: uv run --frozen pytest
working-directory: applications/${{ matrix.application }}
test-dynacell-configs:
name: Test dynacell benchmark configs (Python 3.13, ubuntu-latest)
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v5
- name: Set up uv with Python 3.13
uses: astral-sh/setup-uv@v7
with:
python-version: "3.13"
enable-cache: true
cache-suffix: ubuntu-latest-3.13
- name: Install dynacell with eval deps + test group (CPU)
# The eval-pipeline tests import dynacell.evaluation.pipeline, a hard
# consumer of the eval stack (cubic, cellpose, …). cubic is CPU-capable
# (falls back to numpy/scikit-image without CUDA), so the eval extra
# installs and runs on a GPU-less runner. eval_gpu (cupy/cucim) is NOT
# installed — those are the only CUDA-only deps.
run: uv sync --frozen --extra eval --group test
working-directory: applications/dynacell
- name: Run benchmark-schema + submit-tool + eval-runtime tests
# test_benchmark_config_composition + test_submit_benchmark_job cover
# config composition + the launcher. test_runtime + the two
# test_evaluation_pipeline_parallel* suites cover the runtime module,
# the FovResult pickle contract, and evaluate_predictions end-to-end
# (serial vs spawn-process) on a tiny iohub fixture + prebuilt mask
# cache (target_name=er + require_complete_cache=true short-circuit the
# segmenter + feature-extractor model loads — but pipeline import still
# needs the eval stack). test_evaluation_grouped drives the
# multi-condition driver against the same cache-only fixture.
run: |
uv run --frozen pytest \
tests/test_benchmark_config_composition.py \
tests/test_submit_benchmark_job.py \
tests/test_runtime.py \
tests/test_evaluation_pipeline_parallel.py \
tests/test_evaluation_pipeline_parallel_cpu.py \
tests/test_evaluation_grouped.py \
-v
working-directory: applications/dynacell
check:
name: All tests pass
if: always()
needs: [test, test-data, test-data-extras, test-applications, test-dynacell-configs]
runs-on: ubuntu-latest
steps:
- name: Verify all test jobs succeeded
uses: re-actors/alls-green@release/v1
with:
jobs: ${{ toJSON(needs) }}