summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCaselIT <cfederico87@gmail.com>2021-09-13 21:11:22 +0200
committerCaselIT <cfederico87@gmail.com>2021-09-13 21:15:17 +0200
commit61e34737236ccd2e722b79b60eda2e22eb9dbc49 (patch)
tree3a9dbbb7eb052df030b16550af4632fb053cb35f
parentd7ff21d06192e7b84246494ae1e6cc33cbd42af9 (diff)
downloadalembic-61e34737236ccd2e722b79b60eda2e22eb9dbc49.tar.gz
Add mypy to the github workflow
Fixes: #917 Change-Id: I77d8a3673eb6d990ca947c59f6960925561d122a
-rw-r--r--.github/workflows/run-on-pr.yaml31
-rw-r--r--.github/workflows/run-test.yaml31
-rw-r--r--tox.ini2
3 files changed, 63 insertions, 1 deletions
diff --git a/.github/workflows/run-on-pr.yaml b/.github/workflows/run-on-pr.yaml
index 4943b3e..6a90b03 100644
--- a/.github/workflows/run-on-pr.yaml
+++ b/.github/workflows/run-on-pr.yaml
@@ -48,3 +48,34 @@ jobs:
- name: Run tests
run: tox -e py-${{ matrix.sqlalchemy }}
+
+ run-mypy:
+ name: mypy-${{ matrix.python-version }}-${{ matrix.os }}
+ runs-on: ${{ matrix.os }}
+ strategy:
+ matrix:
+ os:
+ - "ubuntu-latest"
+ python-version:
+ - "3.9"
+
+ fail-fast: false
+
+ steps:
+ - name: Checkout repo
+ uses: actions/checkout@v2
+
+ - name: Set up python
+ uses: actions/setup-python@v2
+ with:
+ python-version: ${{ matrix.python-version }}
+ architecture: ${{ matrix.architecture }}
+
+ - name: Install dependencies
+ run: |
+ python -m pip install --upgrade pip
+ pip install --upgrade tox setuptools
+ pip list
+
+ - name: Run mypy
+ run: tox -e mypy
diff --git a/.github/workflows/run-test.yaml b/.github/workflows/run-test.yaml
index 467d810..7105a8a 100644
--- a/.github/workflows/run-test.yaml
+++ b/.github/workflows/run-test.yaml
@@ -56,3 +56,34 @@ jobs:
- name: Run tests
run: tox -e py-${{ matrix.sqlalchemy }}
+
+ run-mypy:
+ name: mypy-${{ matrix.python-version }}-${{ matrix.os }}
+ runs-on: ${{ matrix.os }}
+ strategy:
+ matrix:
+ os:
+ - "ubuntu-latest"
+ python-version:
+ - "3.9"
+
+ fail-fast: false
+
+ steps:
+ - name: Checkout repo
+ uses: actions/checkout@v2
+
+ - name: Set up python
+ uses: actions/setup-python@v2
+ with:
+ python-version: ${{ matrix.python-version }}
+ architecture: ${{ matrix.architecture }}
+
+ - name: Install dependencies
+ run: |
+ python -m pip install --upgrade pip
+ pip install --upgrade tox setuptools
+ pip list
+
+ - name: Run mypy
+ run: tox -e mypy
diff --git a/tox.ini b/tox.ini
index 5cdbce5..575644b 100644
--- a/tox.ini
+++ b/tox.ini
@@ -66,7 +66,7 @@ deps=
mako
types-pkg-resources
types-python-dateutil
- # is imported in alembic/testing and mypy complains if it's installed.
+ # is imported in alembic/testing and mypy complains if it's not installed.
pytest
commands = mypy ./alembic/ --exclude alembic/templates