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