Skip to content

Commit d033ccc

Browse files
committed
Run automatic type checks on commit
1 parent 7299cc0 commit d033ccc

File tree

2 files changed

+37
-1
lines changed

2 files changed

+37
-1
lines changed
Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
name: Type Check (on Commit)
2+
3+
on:
4+
push:
5+
branches:
6+
- master
7+
pull_request:
8+
branches:
9+
- master
10+
workflow_dispatch:
11+
12+
jobs:
13+
mypy:
14+
runs-on: windows-latest
15+
steps:
16+
- uses: actions/checkout@v4
17+
18+
- name: Set up Python
19+
uses: actions/setup-python@v5
20+
with:
21+
python-version: '3.11'
22+
cache: 'pip'
23+
24+
- name: Install dependencies
25+
run: |
26+
python -m pip install --upgrade pip
27+
pip install -r requirements.txt
28+
pip install -r requirements-typecheck.txt
29+
30+
- name: Write Public Key
31+
run: python launch.py --write-public-key
32+
33+
- name: Run Mypy
34+
run: |
35+
python -m mypy launch.py launcher.py --disallow-untyped-defs --disallow-incomplete-defs

typecheck.bat

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,8 @@ if errorlevel 1 (
2424
)
2525

2626
:: Run mypy on the entry point
27-
python -m mypy mousetracks2 launch.py launcher.py --disallow-untyped-defs --disallow-incomplete-defs
27+
python launch.py --write-public-key
28+
python -m mypy launch.py launcher.py --disallow-untyped-defs --disallow-incomplete-defs
2829

2930
:: Exit the virtual environment
3031
call deactivate

0 commit comments

Comments
 (0)