Skip to content

Commit 27b9235

Browse files
committed
ci: Add mypy checks for runtime & syntax
1 parent a8259dd commit 27b9235

File tree

4 files changed

+27
-7
lines changed

4 files changed

+27
-7
lines changed

.github/workflows/fluent.runtime.yml

Lines changed: 12 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -46,19 +46,28 @@ jobs:
4646
run: |
4747
./runtests.py
4848
lint:
49-
name: flake8
5049
runs-on: ubuntu-latest
5150
steps:
5251
- uses: actions/checkout@v3
5352
- uses: actions/setup-python@v4
5453
with:
5554
python-version: 3.9
5655
- name: Install dependencies
56+
working-directory: ./fluent.runtime
5757
run: |
5858
python -m pip install wheel
5959
python -m pip install --upgrade pip
60-
python -m pip install flake8==6
61-
- name: lint
60+
python -m pip install .
61+
python -m pip install flake8==6 mypy==1 types-babel types-pytz
62+
- name: Install latest fluent.syntax
63+
working-directory: ./fluent.syntax
64+
run: |
65+
python -m pip install .
66+
- name: flake8
6267
working-directory: ./fluent.runtime
6368
run: |
6469
python -m flake8
70+
- name: mypy
71+
working-directory: ./fluent.runtime
72+
run: |
73+
python -m mypy fluent/

.github/workflows/fluent.syntax.yml

Lines changed: 9 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -39,19 +39,24 @@ jobs:
3939
working-directory: ./fluent.syntax
4040
run: |
4141
./runtests.py
42-
syntax:
43-
name: flake8
42+
lint:
4443
runs-on: ubuntu-latest
4544
steps:
4645
- uses: actions/checkout@v3
4746
- uses: actions/setup-python@v4
4847
with:
4948
python-version: 3.9
5049
- name: Install dependencies
50+
working-directory: ./fluent.syntax
5151
run: |
5252
python -m pip install --upgrade pip
53-
python -m pip install flake8==6
54-
- name: lint
53+
python -m pip install .
54+
python -m pip install flake8==6 mypy==1
55+
- name: flake8
5556
working-directory: ./fluent.syntax
5657
run: |
5758
python -m flake8
59+
- name: mypy
60+
working-directory: ./fluent.syntax
61+
run: |
62+
python -m mypy fluent/

fluent.runtime/setup.cfg

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,3 +12,6 @@ max-line-length=120
1212
line_length=120
1313
skip_glob=.tox
1414
not_skip=__init__.py
15+
16+
[mypy]
17+
strict = True

fluent.syntax/setup.cfg

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,3 +12,6 @@ max-line-length=120
1212
line_length=120
1313
skip_glob=.tox
1414
not_skip=__init__.py
15+
16+
[mypy]
17+
strict = True

0 commit comments

Comments
 (0)