From da14cd050206989a9c04e26da74de66517abee3b Mon Sep 17 00:00:00 2001 From: Uri Shaked Date: Tue, 19 Sep 2023 19:59:31 +0300 Subject: [PATCH] ci: github action to check python types --- .github/workflows/mypy-check.yaml | 32 +++++++++++++++++++++++++++++++ 1 file changed, 32 insertions(+) create mode 100644 .github/workflows/mypy-check.yaml diff --git a/.github/workflows/mypy-check.yaml b/.github/workflows/mypy-check.yaml new file mode 100644 index 0000000..148e972 --- /dev/null +++ b/.github/workflows/mypy-check.yaml @@ -0,0 +1,32 @@ +name: Mypy Type Checking + +on: + push: + pull_request: + workflow_dispatch: + +jobs: + type-check: + runs-on: ubuntu-latest + + steps: + - name: Check out code + uses: actions/checkout@v2 + + - name: Set up Python + uses: actions/setup-python@v2 + with: + python-version: '3.9' + + - name: Install dependencies + run: | + python -m pip install --upgrade pip + if [ -f requirements.txt ]; then pip install -r requirements.txt; fi + + - name: Install mypy + run: | + pip install mypy + + - name: Run mypy + run: | + mypy project.py git_utils.py --check-untyped-defs