File tree 2 files changed +67
-1
lines changed 2 files changed +67
-1
lines changed Original file line number Diff line number Diff line change 68
68
TERM : xterm-256color
69
69
LD_LIBRARY_PATH : " /usr/local/lib/" # to find libopenblas.so.0
70
70
run : |
71
- export NPY_RUN_MYPY_IN_TESTSUITE=1
72
71
pip install pytest pytest-xdist hypothesis typing_extensions
73
72
spin test -j auto
Original file line number Diff line number Diff line change
1
+ name : Run MyPy
2
+
3
+ # Mypy is too slow to run as part of regular CI. The purpose of the jobs in
4
+ # this file is to cover running Mypy across:
5
+ #
6
+ # - OSes: Linux, Windows and macOS
7
+ # - Python versions: lowest/highest supported versions, and an intermediate one
8
+ #
9
+ # The build matrix aims for sparse coverage across those two dimensions.
10
+ # Use of BLAS/LAPACK and SIMD is disabled on purpose, because those things
11
+ # don't matter for static typing and this speeds up the builds.
12
+ #
13
+ # This is a separate job file so it's easy to trigger by hand.
14
+
15
+ on :
16
+ pull_request :
17
+ branches :
18
+ - main
19
+ - maintenance/**
20
+ paths-ignore :
21
+ - ' !benchmarks/'
22
+ - ' !.circlecl/'
23
+ - ' !docs/'
24
+ - ' !meson_cpu/'
25
+ - ' !tools/'
26
+ workflow_dispatch :
27
+
28
+ defaults :
29
+ run :
30
+ shell : bash
31
+
32
+ concurrency :
33
+ group : ${{ github.workflow }}-${{ github.head_ref || github.run_id }}
34
+ cancel-in-progress : true
35
+
36
+ permissions :
37
+ contents : read # to fetch code (actions/checkout)
38
+
39
+ jobs :
40
+ mypy :
41
+ if : " github.repository == 'numpy/numpy'"
42
+ name : " MyPy"
43
+ runs-on : ${{ matrix.os_python[0] }}
44
+ strategy :
45
+ matrix :
46
+ os_python :
47
+ - [ubuntu-latest, '3.10'] # switch to 3.12-dev after mypy is upgraded (see gh-23764)
48
+ - [windows-2019, '3.11']
49
+ - [macos-12, '3.9']
50
+ steps :
51
+ - uses : actions/checkout@c85c95e3d7251135ab7dc9ce3241c5835cc595a9 # v3.5.3
52
+ with :
53
+ submodules : recursive
54
+ fetch-depth : 0
55
+ - uses : actions/setup-python@61a6322f88396a6271a6ee3565807d608ecaddd1 # v4.7.0
56
+ with :
57
+ python-version : ${{ matrix.os_python[1] }}
58
+ - name : Install dependencies
59
+ run : |
60
+ pip install -r build_requirements.txt
61
+ pip install -r test_requirements.txt
62
+ - name : Build
63
+ run : |
64
+ spin build -j2 -- -Dallow-noblas=true -Ddisable-optimization=true --vsenv
65
+ - name : Run Mypy
66
+ run : |
67
+ spin mypy
You can’t perform that action at this time.
0 commit comments