black #4
This file contains 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: Linters | |
on: | |
push: | |
branches: | |
- master | |
- main | |
pull_request: | |
branches: | |
- master | |
- main | |
types: | |
- ready_for_review | |
workflow_dispatch: {} | |
jobs: | |
mypy: | |
runs-on: ubuntu-latest | |
timeout-minutes: 15 | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Set up Python 3.9 | |
uses: actions/setup-python@v4 | |
with: | |
python-version: 3.9 | |
- name: Install mypy | |
run: pip3 install mypy | |
- name: Run mypy | |
working-directory: ${{github.workspace}} | |
run: | | |
mkdir .mypy_cache | |
mypy . --disallow-untyped-calls --explicit-package-bases --ignore-missing-imports --install-types --non-interactive --cache-dir=.mypy_cache/ | |
flake8: | |
runs-on: ubuntu-latest | |
timeout-minutes: 15 | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Set up Python 3.9 | |
uses: actions/setup-python@v4 | |
with: | |
python-version: 3.9 | |
- name: Install flake8 | |
run: pip3 install flake8 | |
- name: Run flake8 | |
working-directory: ${{github.workspace}} | |
run: flake8 . | |
black: | |
runs-on: ubuntu-latest | |
timeout-minutes: 15 | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Set up Python 3.9 | |
uses: actions/setup-python@v4 | |
with: | |
python-version: 3.9 | |
- name: Install black | |
run: pip3 install black | |
- name: Run black | |
working-directory: ${{github.workspace}} | |
run: black --check . | |
isort: | |
runs-on: ubuntu-latest | |
timeout-minutes: 15 | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Set up Python 3.9 | |
uses: actions/setup-python@v4 | |
with: | |
python-version: 3.9 | |
- name: Install isort | |
run: pip3 install isort | |
- name: Run isort | |
working-directory: ${{github.workspace}} | |
run: isort --check . |