Fix broken explanations of shell commands in edge cases #246
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: Lint | |
on: | |
workflow_call: | |
workflow_dispatch: | |
push: | |
branches: | |
- "**" | |
paths: | |
- "shell_whiz/**/*.py" | |
- pyproject.toml | |
- .flake8 | |
- poetry.lock | |
jobs: | |
lint: | |
strategy: | |
fail-fast: false | |
matrix: | |
os: | |
[ | |
ubuntu-20.04, | |
ubuntu-22.04, | |
windows-2019, | |
windows-2022, | |
macos-11, | |
macos-12, | |
] | |
runs-on: ${{ matrix.os }} | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Setup Python | |
uses: actions/setup-python@v5 | |
with: | |
python-version: ${{ vars.PYTHON_VERSION }} | |
cache: pip | |
- name: Setup Poetry | |
run: pip install poetry==${{ vars.POETRY_VERSION }} | |
- name: Cache Poetry | |
uses: actions/setup-python@v5 | |
with: | |
python-version: ${{ vars.PYTHON_VERSION }} | |
cache: poetry | |
- name: Install dependencies | |
run: poetry install | |
- name: Run Black | |
run: poetry run black --color --check --diff --verbose shell_whiz | |
- name: Run Flake8 | |
run: poetry run flake8 --color always --verbose shell_whiz | |
- name: Run isort | |
run: poetry run isort --color --check --diff --verbose shell_whiz | |
- name: Cache mypy | |
uses: actions/cache@v4 | |
with: | |
path: .mypy_cache | |
key: mypy-${{ matrix.os }}-python-${{ vars.PYTHON_VERSION }}-${{ hashFiles('**/pyproject.toml') }} | |
- name: Run mypy | |
run: poetry run mypy -p shell_whiz |