Mvc add typing (#441) #1
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: lint_python | |
on: [pull_request, push] | |
jobs: | |
lint_python: | |
runs-on: ubuntu-24.04 | |
steps: | |
- uses: actions/checkout@v3 | |
- uses: actions/setup-python@v4 | |
with: | |
python-version: 3.12 | |
- name: Install dependencies | |
run: | | |
python -m pip install --upgrade pip | |
pip install -r requirements-dev.txt | |
- name: Lint with flake8 | |
run: flake8 ./patterns --count --show-source --statistics | |
continue-on-error: true | |
- name: Format check with isort and black | |
run: | | |
isort --profile black --check ./patterns | |
black --check ./patterns | |
continue-on-error: true | |
- name: Type check with mypy | |
run: mypy --ignore-missing-imports ./patterns || true | |
continue-on-error: true | |
- name: Run tests with pytest | |
run: | | |
pytest ./patterns | |
pytest --doctest-modules ./patterns || true | |
continue-on-error: true | |
- name: Check Python version compatibility | |
run: shopt -s globstar && pyupgrade --py312-plus ./patterns/**/*.py | |
continue-on-error: true | |
- name: Run tox | |
run: tox | |
continue-on-error: true |