Skip to content

Commit f2819fe

Browse files
CI: mypy: add mypy test to github actions
This adds a very basic CI run for type checking on ubuntu-latest in the github actions pipelines.
1 parent dc6d18a commit f2819fe

File tree

1 file changed

+30
-0
lines changed

1 file changed

+30
-0
lines changed

.github/workflows/linux.yml

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -79,3 +79,33 @@ jobs:
7979
- name: Test SciPy
8080
run: |
8181
python3.9 -u runtests.py -m fast
82+
83+
test_mypy:
84+
name: Type Checking
85+
if: "github.repository == 'scipy/scipy' && !contains(github.event.head_commit.message, '[ci skip]') && !contains(github.event.head_commit.message, '[skip ci]') && !contains(github.event.head_commit.message, '[skip github]') && !contains(github.ref, 'maintenance/')"
86+
runs-on: ubuntu-latest
87+
strategy:
88+
matrix:
89+
python-version: [3.9]
90+
91+
steps:
92+
- uses: actions/checkout@v2
93+
94+
- name: Install Python 3.9
95+
if: matrix.python-version == '3.9'
96+
run: |
97+
sudo apt-get update
98+
sudo apt-get install -y --no-install-recommends python3.9-dev python3.9-distutils python3.9-venv
99+
python3.9 -m pip install --upgrade pip setuptools
100+
101+
- name: Install other build dependencies
102+
run: |
103+
sudo apt-get install libatlas-base-dev liblapack-dev gfortran libgmp-dev libmpfr-dev libsuitesparse-dev ccache libmpc-dev
104+
105+
- name: Install packages
106+
run: |
107+
python3.9 -m pip install --user numpy setuptools wheel cython pytest pytest-xdist pybind11 pytest-xdist pythran
108+
109+
- name: Mypy
110+
run: |
111+
python3.9 -u runtests.py --mypy

0 commit comments

Comments
 (0)