* Fix CI

* Fix CI

* Fix CI

* Fix CI

* APply black

* APply black

* Fix mypy

* Fix mypy errors in django-stubs

* Fix format

* Fix plugin

* Do not patch builtins by default

* Fix mypy

* Only run mypy on 3.10 for now

* Only run mypy on 3.10 for now

* WHAT THE HELL

* Enable strict mode in mypy

* Enable strict mode in mypy

* Fix tests

* Fix tests

* Debug

* Debug

* Fix tests

* Fix tests

* Add TYPE_CHECKING debug

* Caching maybe?

* Caching maybe?

* Try explicit `${{ matrix.python-version }}`

* Remove debug

* Fix typing

* Finally
This commit is contained in:
Nikita Sobolev
2022-08-26 13:22:55 +03:00
committed by GitHub
parent d2bfd3710b
commit 0bb1182c42
80 changed files with 223 additions and 582 deletions

View File

@@ -27,11 +27,40 @@ jobs:
- name: Run pre-commit
run: pre-commit install && pre-commit run --all-files
mypy-self-check:
runs-on: ubuntu-latest
strategy:
matrix:
python-version: ['3.7', '3.8', '3.9', '3.10']
steps:
- uses: actions/checkout@v3
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}
- name: Install dependencies
run: |
pip install -U pip setuptools wheel
pip install -r ./requirements.txt
- name: Run mypy on plugin code
run: mypy --strict mypy_django_plugin
- name: Run mypy on ext code
run: mypy --strict django_stubs_ext
- name: Run mypy on scripts and utils
run: mypy --strict scripts
# TODO: run this check on versions, not only 3.10
- name: Run mypy on stubs
if: ${{ matrix.python-version }} == '3.10'
run: |
mypy --cache-dir=/dev/null --no-incremental django-stubs
test:
runs-on: ubuntu-latest
strategy:
matrix:
python-version: ['3.8']
python-version: ['3.9']
steps:
- uses: actions/checkout@v3
- name: Setup system dependencies
@@ -46,7 +75,7 @@ jobs:
pip install -r ./requirements.txt
- name: Run tests
run: pytest --mypy-ini-file=mypy.ini
run: PYTHONPATH='.' pytest
typecheck:
runs-on: ubuntu-latest