mirror of
https://github.com/davidhalter/django-stubs.git
synced 2025-12-29 07:06:56 +08:00
Fix CI (#1108)
* 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:
33
.github/workflows/test.yml
vendored
33
.github/workflows/test.yml
vendored
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user