mypy_test.py: Move type-checking of our tests and scripts into a different test (#8587)

This commit is contained in:
Alex Waygood
2022-08-22 17:16:03 +01:00
committed by GitHub
parent 5ea1b1e6de
commit 875f0ca7fc
5 changed files with 171 additions and 88 deletions

View File

@@ -61,7 +61,7 @@ jobs:
- run: ./tests/pytype_test.py --print-stderr
mypy:
name: Run mypy against typeshed
name: Test the stubs with mypy
runs-on: ubuntu-latest
strategy:
matrix:
@@ -77,7 +77,7 @@ jobs:
- run: ./tests/mypy_test.py --platform=${{ matrix.platform }} --python-version=${{ matrix.python-version }}
pyright:
name: Run pyright against typeshed
name: Test the stubs with pyright
runs-on: ubuntu-latest
strategy:
matrix:

View File

@@ -0,0 +1,36 @@
name: Typecheck-typeshed-code
on:
workflow_dispatch:
push:
branches:
- main
- master
pull_request:
paths:
- 'scripts/**'
- 'tests/**'
- '.github/workflows/typecheck_typeshed_code.yml'
- 'requirements-tests.txt'
permissions:
contents: read
env:
PIP_DISABLE_PIP_VERSION_CHECK: 1
jobs:
mypy:
name: Run mypy against the scripts and tests directories
runs-on: ubuntu-latest
strategy:
matrix:
platform: ["linux", "win32"]
fail-fast: false
steps:
- uses: actions/checkout@v3
- uses: actions/setup-python@v4
with:
python-version: 3.9
- run: pip install -r requirements-tests.txt
- run: python ./tests/typecheck_typeshed.py --platform=${{ matrix.platform }}