Re-enable linting action #1
Workflow file for this run
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: Python Linting | |
| on: | |
| pull_request: | |
| jobs: | |
| run-linters: | |
| name: Run linters | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Check out Git repository | |
| uses: actions/checkout@v3 | |
| - name: Set up Python | |
| uses: actions/setup-python@v1 | |
| with: | |
| python-version: "3.10" | |
| - name: Install Poetry | |
| uses: snok/install-poetry@v1 | |
| with: | |
| virtualenvs-create: true | |
| virtualenvs-in-project: true | |
| installer-parallel: true | |
| - name: Load cached venv | |
| id: cached-poetry-dependencies | |
| uses: actions/cache@v2 | |
| with: | |
| path: .venv | |
| key: venv-${{ runner.os }}-${{ hashFiles('**/poetry.lock') }} | |
| - name: Install dependencies | |
| if: steps.cached-poetry-dependencies.outputs.cache-hit != 'true' | |
| run: poetry install --no-interaction --no-root | |
| - name: Run linters | |
| uses: wearerequired/lint-action@v1 | |
| with: | |
| github_token: ${{ secrets.github_token }} | |
| # Enable linters | |
| black: true | |
| black_command_prefix: "poetry run " | |
| flake8: true | |
| flake8_command_prefix: "poetry run " | |
| mypy: true | |
| mypy_args: "th_cli/main.py" | |
| mypy_command_prefix: "poetry run " |