@@ -121,28 +121,85 @@ jobs:
121
121
# NOTE: `uv run --with=...` will be ignored by mypy (and `--isolated` does not help)
122
122
- name : mypy
123
123
run : |
124
- uv sync --no-editable --group=mypy
124
+ uv sync --no-editable --group=test_numpy --group= mypy
125
125
uv pip install numpy==${{ matrix.numpy-version }}
126
126
uv run --no-sync --active \
127
127
mypy --tb --no-incremental --cache-dir=/dev/null \
128
128
${{ steps.collect-files.outputs.files }}
129
129
130
130
- name : basedmypy
131
131
run : |
132
- uv sync --no-editable --group=basedmypy
132
+ uv sync --no-editable --group=test_numpy --group= basedmypy
133
133
uv pip install numpy==${{ matrix.numpy-version }}
134
134
uv run --no-sync --active \
135
135
mypy --tb --no-incremental --cache-dir=/dev/null \
136
136
${{ steps.collect-files.outputs.files }}
137
137
138
138
- name : pyright
139
139
run : |
140
- uv sync --no-editable --group=pyright
140
+ uv sync --no-editable --group=test_numpy --group= pyright
141
141
uv pip install numpy==${{ matrix.numpy-version }}
142
142
uv run --no-sync --active \
143
143
pyright ${{ steps.collect-files.outputs.files }}
144
144
145
145
# TODO: (based)pyright
146
146
147
+ test_integration_jax :
148
+ name : integration tests (jax)
149
+ runs-on : ubuntu-latest
150
+ strategy :
151
+ fail-fast : false
152
+ matrix :
153
+ jax-version : ["0.7.0"]
154
+
155
+ steps :
156
+ - uses : actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
157
+
158
+ - uses : astral-sh/setup-uv@d9e0f98d3fc6adb07d1e3d37f3043649ddad06a1 # v6.5.0
159
+ with :
160
+ python-version : " 3.11"
161
+ activate-environment : true
162
+
163
+ - name : get major.minor jax version
164
+ id : jax-version
165
+ run : |
166
+ version="${{ matrix.jax-version }}"
167
+ major=$(echo "$version" | cut -d. -f1)
168
+ minor=$(echo "$version" | cut -d. -f2)
169
+
170
+ echo "major=$major" >> $GITHUB_OUTPUT
171
+ echo "minor=$minor" >> $GITHUB_OUTPUT
172
+
173
+ - name : collect test files
174
+ id : collect-files
175
+ run : |
176
+ major="${{ steps.jax-version.outputs.major }}"
177
+ minor="${{ steps.jax-version.outputs.minor }}"
178
+
179
+ prefix="tests/integration"
180
+ files=""
181
+
182
+ while IFS= read -r -d '' path; do
183
+ fname=$(basename "$path")
184
+ fminor=$(echo "$fname" | sed -E "s/test_jax${major}p([0-9]+)\.pyi/\1/")
185
+ if [ "$fminor" -le "$minor" ]; then
186
+ files="$files $path"
187
+ fi
188
+ done < <(find "$prefix" -name "test_jax${major}p*.pyi" -print0)
189
+
190
+ files="${files# }"
191
+ echo "files=$files" >> "$GITHUB_OUTPUT"
192
+
193
+ # NOTE: `uv run --with=...` will be ignored by mypy (and `--isolated` does not help)
194
+ - name : mypy
195
+ run : |
196
+ uv sync --no-editable --group=test_jax --group=mypy
197
+ uv pip install jax==${{ matrix.jax-version }}
198
+ uv run --no-sync --active \
199
+ mypy --tb --no-incremental --cache-dir=/dev/null \
200
+ ${{ steps.collect-files.outputs.files }}
201
+
202
+ # TODO: basedmypy/(based)pyright
203
+
147
204
# TODO: integration tests for array-api-strict
148
205
# TODO: integration tests for 3rd party libs such as cupy, pytorch, tensorflow, dask, etc.
0 commit comments