Skip to content

Commit a7976bc

Browse files
committed
ci: add a job that check the typing
1 parent 44ae032 commit a7976bc

File tree

2 files changed

+31
-0
lines changed

2 files changed

+31
-0
lines changed

.github/workflows/mypy.yml

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
name: Typing Check
2+
3+
on:
4+
push:
5+
paths:
6+
- '**.py'
7+
pull_request:
8+
paths:
9+
- '**.py'
10+
11+
jobs:
12+
mypy:
13+
runs-on: ubuntu-latest
14+
15+
steps:
16+
- name: Checkout code
17+
uses: actions/checkout@v4
18+
19+
- name: Set up Python
20+
uses: actions/setup-python@v5
21+
with:
22+
python-version: '3.10' # oldest supported python version
23+
24+
- name: Install dependencies
25+
run: |
26+
python -m pip install --upgrade pip
27+
pip install .[dev]
28+
29+
- name: Run mypy
30+
run: mypy

setup.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,7 @@ def _read_requirements(filename):
4242
packages=setuptools.find_packages(),
4343
package_data={"fastapi_cloudevents": ["py.typed"]},
4444
install_requires=_read_requirements("requirements.txt"),
45+
extras_require={"dev": ["mypy"]},
4546
classifiers=[
4647
"Intended Audience :: Information Technology",
4748
"Intended Audience :: System Administrators",

0 commit comments

Comments
 (0)