mirror of
https://github.com/fastapi-users/fastapi-users.git
synced 2025-11-02 12:21:53 +08:00
Add typecheck to build steps
This commit is contained in:
9
.github/workflows/build.yml
vendored
9
.github/workflows/build.yml
vendored
@ -21,9 +21,12 @@ jobs:
|
|||||||
python -m pip install --upgrade pip
|
python -m pip install --upgrade pip
|
||||||
pip install -r requirements.dev.txt
|
pip install -r requirements.dev.txt
|
||||||
- name: Check codestyle
|
- name: Check codestyle
|
||||||
run: make format-check
|
run: |
|
||||||
- name: Lint
|
make format-check
|
||||||
run: make lint
|
make lint
|
||||||
|
- name: Typecheck
|
||||||
|
run: |
|
||||||
|
make typecheck
|
||||||
- name: Test with pytest
|
- name: Test with pytest
|
||||||
env:
|
env:
|
||||||
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}
|
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}
|
||||||
|
|||||||
3
Makefile
3
Makefile
@ -25,6 +25,9 @@ format-check: isort-src-check isort-docs-check isort-examples-check
|
|||||||
lint:
|
lint:
|
||||||
flake8 ./fastapi_users ./tests
|
flake8 ./fastapi_users ./tests
|
||||||
|
|
||||||
|
typecheck:
|
||||||
|
mypy fastapi_users/
|
||||||
|
|
||||||
test:
|
test:
|
||||||
pytest --cov=fastapi_users/ --cov-report=term-missing --cov-fail-under=100
|
pytest --cov=fastapi_users/ --cov-report=term-missing --cov-fail-under=100
|
||||||
|
|
||||||
|
|||||||
@ -9,6 +9,22 @@ ignore_missing_imports = true
|
|||||||
module = "passlib.*"
|
module = "passlib.*"
|
||||||
ignore_missing_imports = true
|
ignore_missing_imports = true
|
||||||
|
|
||||||
|
[[tool.mypy.overrides]]
|
||||||
|
module = "fastapi_users_db_mongodb.*"
|
||||||
|
ignore_missing_imports = true
|
||||||
|
|
||||||
|
[[tool.mypy.overrides]]
|
||||||
|
module = "fastapi_users_db_sqlalchemy.*"
|
||||||
|
ignore_missing_imports = true
|
||||||
|
|
||||||
|
[[tool.mypy.overrides]]
|
||||||
|
module = "fastapi_users_db_tortoise.*"
|
||||||
|
ignore_missing_imports = true
|
||||||
|
|
||||||
|
[[tool.mypy.overrides]]
|
||||||
|
module = "fastapi_users_db_ormar.*"
|
||||||
|
ignore_missing_imports = true
|
||||||
|
|
||||||
[tool.pytest.ini_options]
|
[tool.pytest.ini_options]
|
||||||
asyncio_mode = "auto"
|
asyncio_mode = "auto"
|
||||||
addopts = "--ignore=test_build.py"
|
addopts = "--ignore=test_build.py"
|
||||||
|
|||||||
Reference in New Issue
Block a user