-
-
Notifications
You must be signed in to change notification settings - Fork 12.3k
64 lines (54 loc) · 1.73 KB
/
stubtest.yml
File metadata and controls
64 lines (54 loc) · 1.73 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
name: stubtest
permissions: read-all
# Stubtest depends on different branches and paths than mypy does, so we have a separate workflow.
on:
pull_request:
branches:
- "main"
- "maintenance/2.**"
# Stubtest requires numpy>=2.4
- "!maintenance/2.[0-3].x"
paths:
- ".github/workflows/stubtest.yml"
- "numpy/**"
- "!numpy/**/tests/**"
- "requirements/typing_requirements.txt"
- "tools/stubtest/**"
workflow_dispatch:
concurrency:
group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }}
cancel-in-progress: true
jobs:
mypy:
# To enable this workflow on a fork, comment out:
if: github.repository == 'numpy/numpy'
name: stubtest
runs-on: ${{ matrix.os }}-latest
strategy:
fail-fast: false
matrix:
# TODO: consider including macos and windows
os: [ubuntu]
py: ["3.12", "3.14"]
steps:
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
with:
submodules: recursive
fetch-tags: true
persist-credentials: false
- uses: astral-sh/setup-uv@cec208311dfd045dd5311c1add060b2062131d57 # v8.0.0
with:
python-version: ${{ matrix.py }}
activate-environment: true
cache-dependency-glob: |
requirements/build_requirements.txt
requirements/typing_requirements.txt
- name: uv pip install
run: >-
uv pip install
-r requirements/build_requirements.txt
-r requirements/typing_requirements.txt
- name: spin build
run: spin build -j2 -- -Dallow-noblas=true -Ddisable-optimization=true --vsenv
- name: spin stubtest
run: spin stubtest