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