Skip to content

Commit cc4dc96

Browse files
committed
Move mypy linter to a separate workflow, only for PRs.
1 parent 35f04a2 commit cc4dc96

File tree

2 files changed

+28
-17
lines changed

2 files changed

+28
-17
lines changed

.github/workflows/pr-linters.yaml

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
name: Run PR linters
2+
3+
on:
4+
pull_request:
5+
workflow_dispatch:
6+
7+
permissions:
8+
contents: read
9+
pull-requests: read
10+
11+
jobs:
12+
13+
mypy:
14+
name: Run mypy static type checker (optional)
15+
runs-on: ubuntu-latest
16+
continue-on-error: true
17+
steps:
18+
- uses: actions/checkout@v4
19+
- uses: actions/setup-python@v5
20+
with:
21+
python-version: 3.12
22+
cache: pip
23+
cache-dependency-path: |
24+
'pyproject.toml'
25+
'requirements-dev.txt'
26+
- run: pip install -r requirements-dev.txt -e .
27+
- name: Run mypy and report
28+
run: mypy --config-file pyproject.toml .

.github/workflows/pythonpackage.yml

Lines changed: 0 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -61,20 +61,3 @@ jobs:
6161
run: python3 -m pip install -r doc/requirements.txt -e .
6262
- name: Build docs
6363
run: make -C doc html
64-
65-
mypy:
66-
name: Run mypy static type checker (optional)
67-
runs-on: ubuntu-latest
68-
continue-on-error: true
69-
steps:
70-
- uses: actions/checkout@v4
71-
- uses: actions/setup-python@v5
72-
with:
73-
python-version: 3.12
74-
cache: pip
75-
cache-dependency-path: |
76-
'pyproject.toml'
77-
'requirements-dev.txt'
78-
- run: pip install -r requirements-dev.txt -e .
79-
- name: Run mypy and report but do not fail
80-
run: mypy --config-file pyproject.toml . || true

0 commit comments

Comments
 (0)