Skip to content

Commit bd226ab

Browse files
committed
add mypy CI check
1 parent 0d6ed23 commit bd226ab

4 files changed

Lines changed: 5679 additions & 0 deletions

File tree

Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
1+
name: Python Type Check
2+
3+
concurrency:
4+
group: ${{ github.workflow }}-${{ github.ref }}
5+
cancel-in-progress: true
6+
7+
on:
8+
pull_request:
9+
push:
10+
branches:
11+
- dev
12+
13+
jobs:
14+
typecheck:
15+
name: mypy --strict (baseline)
16+
runs-on: ubuntu-latest
17+
timeout-minutes: 10
18+
19+
steps:
20+
- uses: actions/checkout@v3
21+
22+
- name: Setup Python
23+
uses: actions/setup-python@v3
24+
with:
25+
python-version: '3.10'
26+
27+
- name: Cache pip
28+
uses: actions/cache@v3
29+
with:
30+
path: ~/.cache/pip
31+
key: typecheck-${{ runner.os }}-${{ hashFiles('requirements-dev.txt') }}
32+
restore-keys: typecheck-${{ runner.os }}-
33+
34+
- name: Install type-check dependencies
35+
run: pip install -r requirements-dev.txt
36+
37+
- name: Run mypy with baseline filter
38+
# Fails if any *new* violations are introduced beyond the frozen baseline.
39+
# To update the baseline after fixing violations, run locally:
40+
# python -m mypy -p aaz_dev | python -m mypy_baseline sync
41+
# and commit the updated mypy-baseline.txt.
42+
run: python -m mypy -p aaz_dev | python -m mypy_baseline filter

0 commit comments

Comments
 (0)