39
39
with:
40
40
activate-environment: true
41
41
python-version: "3.13"
42
- version: "0.8.3"
43
42
44
43
- name: ruff
45
44
run: |
@@ -50,75 +49,101 @@ jobs:
50
49
- name: pyright
51
50
uses: jakebailey/
[email protected]
52
51
53
- generate-matrix:
54
- name: Generate Test Matrix
52
+ # generate-matrix:
53
+ # name: Generate Test Matrix
54
+ # runs-on: ubuntu-latest
55
+ # timeout-minutes: 1
56
+
57
+ # outputs:
58
+ # matrix: ${{ steps.set-matrix.outputs.matrix }}
59
+
60
+ # steps:
61
+ # - uses: actions/
[email protected]
62
+
63
+ # - name: Install uv
64
+ # uses: astral-sh/
[email protected]
65
+ # with:
66
+ # python-version: "3.13"
67
+
68
+ # - name: Generate Matrix
69
+ # id: set-matrix
70
+ # shell: bash
71
+ # run: |
72
+ # matrix=$(uv run scripts/generate_matrix.py | jq -c)
73
+ # echo "matrix=$matrix" >> $GITHUB_OUTPUT
74
+
75
+ typecheck:
55
76
runs-on: ubuntu-latest
56
- timeout-minutes: 1
77
+ timeout-minutes: 5
57
78
58
- outputs:
59
- matrix: ${{ steps.set-matrix.outputs.matrix }}
79
+ strategy:
80
+ fail-fast: false
81
+ matrix:
82
+ py: ["3.11"]
83
+ np: ["1.25", "2.0", "2.1", "2.2", "2.3"]
60
84
61
85
steps:
62
86
63
87
64
- - uses: astral-sh/
[email protected]
88
+ - name: setup uv
89
+
65
90
with:
66
- python-version: "3.13"
67
- version: "0.8.3"
91
+ activate-environment: true
92
+ python- version: ${{ matrix.py }}
68
93
69
- - name: Generate Matrix
70
- id: set-matrix
71
- shell: bash
72
- run: |
73
- matrix=$(uv run scripts/generate_matrix.py | jq -c)
74
- echo "matrix=$matrix" >> $GITHUB_OUTPUT
94
+ # NOTE: mypy ignores `uv run --with=...` (and `--isolated` does not help), so we
95
+ # manually (re)install the desired version directly in the environment.
96
+ - name: sync env
97
+ run: uv sync --no-editable
98
+
99
+ - name: install specific numpy version
100
+ run: uv pip install --upgrade "numpy-typing-compat==${{ matrix.np }}.*"
101
+
102
+ - name: basedpyright scipy-stubs
103
+ run: basedpyright scipy-stubs
104
+
105
+ - name: mypy scipy-stubs
106
+ run: mypy --no-incremental --cache-dir=/dev/null scipy-stubs
107
+
108
+ - name: stubtest scipy
109
+ run: stubtest --allowlist=.mypyignore scipy
75
110
76
111
typetest:
77
- needs: generate-matrix
112
+ # needs: generate-matrix
78
113
runs-on: ubuntu-latest
79
- timeout-minutes: 3
114
+ timeout-minutes: 5
80
115
81
116
strategy:
82
117
fail-fast: false
83
- matrix: ${{ fromJSON(needs.generate-matrix.outputs.matrix) }}
118
+ matrix:
119
+ py: ["3.11", "3.12", "3.13"]
120
+ np: ["1.25", "2.0", "2.1", "2.2", "2.3"]
121
+ exclude:
122
+ - py: "3.12"
123
+ np: "1.25"
124
+ - py: "3.13"
125
+ np: "1.25"
126
+ - py: "3.13"
127
+ np: "2.0"
84
128
85
129
steps:
86
130
87
131
88
132
- uses: astral-sh/
[email protected]
89
133
with:
90
- python-version: ${{ matrix.python }}
91
- version: "0.8.3"
92
-
93
- - name: basedpyright
94
- run: >
95
- uv run
96
- -p ${{ matrix.python }}
97
- --with="numpy==${{ matrix.numpy }}"
98
- --no-editable
99
- basedpyright
100
-
101
- - name: mypy
102
- run: >
103
- uv run
104
- -p ${{ matrix.python }}
105
- --with="numpy==${{ matrix.numpy }}"
106
- --no-editable
107
- mypy
108
- --tb
109
- --hide-error-context
110
- --hide-error-code-links
111
- --no-incremental
112
- --cache-dir=/dev/null
113
- --soft-error-limit=-1
114
- .
115
-
116
- - name: stubtest
117
- run: >
118
- uv run
119
- -p ${{ matrix.python }}
120
- --with="numpy==${{ matrix.numpy }}"
121
- --no-editable
122
- stubtest
123
- --allowlist=.mypyignore
124
- scipy
134
+ activate-environment: true
135
+ python-version: ${{ matrix.py }}
136
+
137
+ # NOTE: mypy ignores `uv run --with=...` (and `--isolated` does not help), so we
138
+ # manually (re)install the desired version directly in the environment.
139
+ - name: sync env
140
+ run: uv sync --no-editable
141
+
142
+ - name: install specific numpy version
143
+ run: uv pip install --upgrade "numpy-typing-compat==${{ matrix.np }}.*"
144
+
145
+ - name: basedpyright tests
146
+ run: basedpyright tests
147
+
148
+ - name: mypy tests
149
+ run: mypy --no-incremental --cache-dir=/dev/null --soft-error-limit=-1 tests
0 commit comments