diff options
| author | Federico Caselli <cfederico87@gmail.com> | 2021-07-22 22:32:28 +0200 |
|---|---|---|
| committer | Federico Caselli <cfederico87@gmail.com> | 2021-07-22 23:09:18 +0200 |
| commit | 7e7d097a633d1b7a95bbd59f9a6d2a5b85249332 (patch) | |
| tree | 9322f723c6b0d3b232076bc1cff3ca8e32c250b6 /.github | |
| parent | b8b0da0e5ffe88cb551939a0173dcc5f756633da (diff) | |
| download | sqlalchemy-7e7d097a633d1b7a95bbd59f9a6d2a5b85249332.tar.gz | |
Add mypy tests on github.
Support skipping mypy tests based on interpreter version
Change-Id: I98963318dbb2e7e097ad5518e0e4022349ca9779
Diffstat (limited to '.github')
| -rw-r--r-- | .github/workflows/run-on-pr.yaml | 34 | ||||
| -rw-r--r-- | .github/workflows/run-test.yaml | 37 |
2 files changed, 71 insertions, 0 deletions
diff --git a/.github/workflows/run-on-pr.yaml b/.github/workflows/run-on-pr.yaml index ecd3da7a9..5d23818b3 100644 --- a/.github/workflows/run-on-pr.yaml +++ b/.github/workflows/run-on-pr.yaml @@ -52,6 +52,40 @@ jobs: - name: Run tests run: tox -e github-${{ matrix.build-type }} -- -q --nomemory --notimingintensive ${{ matrix.pytest-args }} + run-mypy: + name: mypy-${{ matrix.python-version }} + runs-on: ${{ matrix.os }} + strategy: + # run this job using this matrix, excluding some combinations below. + matrix: + os: + - "ubuntu-latest" + python-version: + - "3.9" + + fail-fast: false + + # steps to run in each job. Some are github actions, others run shell commands + 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 tests + run: tox -e mypy ${{ matrix.pytest-args }} + + # Arm emulation is quite slow (~20min) so for now just run it when merging to master # run-test-arm64: # name: ${{ matrix.python-version }}-${{ matrix.build-type }}-arm64-ubuntu-latest diff --git a/.github/workflows/run-test.yaml b/.github/workflows/run-test.yaml index 3d641926a..7f6de8a21 100644 --- a/.github/workflows/run-test.yaml +++ b/.github/workflows/run-test.yaml @@ -122,3 +122,40 @@ jobs: pip list && tox -e github-${{ matrix.build-type }} -- -q --nomemory --notimingintensive ${{ matrix.pytest-args }} " + + run-mypy: + name: mypy-${{ matrix.python-version }} + runs-on: ${{ matrix.os }} + strategy: + # run this job using this matrix, excluding some combinations below. + matrix: + os: + - "ubuntu-latest" + python-version: + - "3.6" + - "3.7" + - "3.8" + - "3.9" + - "3.10.0-beta - 3.10" + + fail-fast: false + + # steps to run in each job. Some are github actions, others run shell commands + 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 tests + run: tox -e mypy ${{ matrix.pytest-args }} |
