ci(deps): bump actions/cache from 3 to 5 #10
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 | |
| on: | |
| push: | |
| branches: [main] | |
| pull_request: | |
| branches: [main] | |
| workflow_dispatch: | |
| jobs: | |
| lint: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Set up Python | |
| uses: actions/setup-python@v5 | |
| with: | |
| python-version: '3.11' | |
| - name: Install Poetry | |
| uses: snok/install-poetry@v1 | |
| with: | |
| version: 1.7.1 | |
| virtualenvs-create: true | |
| virtualenvs-in-project: true | |
| - name: Load cached venv | |
| id: cached-poetry-dependencies | |
| uses: actions/cache@v5 | |
| with: | |
| path: .venv | |
| key: venv-lint-${{ 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: Install project | |
| run: poetry install --no-interaction | |
| - name: Lint with flake8 | |
| run: poetry run flake8 src tests noxfile.py | |
| - name: Check formatting with black | |
| run: poetry run black --check src tests noxfile.py | |
| - name: Check imports with isort | |
| run: poetry run isort --check-only src tests noxfile.py | |
| - name: Type check with mypy | |
| run: poetry run mypy src tests noxfile.py | |
| - name: Security check with bandit | |
| run: poetry run bandit -r src |