Add max line length Ruff rule #103
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: CI | |
| on: [push, pull_request] | |
| jobs: | |
| lint: | |
| name: Linting | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Check out Git repository | |
| uses: actions/checkout@v6 | |
| - name: Install dependencies | |
| uses: ./.github/actions/install-dependencies | |
| with: | |
| uv-sync-extra-args: "--group linting" | |
| # Code based on https://pre-commit.com/#github-actions-example | |
| - name: Set `PY` envvar | |
| run: echo "PY=$(python -VV | sha256sum | cut -d' ' -f1)" >> $GITHUB_ENV | |
| - name: Cache installed pre-commit hooks | |
| uses: actions/cache@v4 | |
| with: | |
| path: ~/.cache/pre-commit | |
| key: pre-commit|${{ env.PY }}|${{ hashFiles('.pre-commit-config.yaml') }} | |
| - name: Run pre-commit hooks | |
| run: make lint | |
| test: | |
| name: Tests | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Check out Git repository | |
| uses: actions/checkout@v6 | |
| - name: Install dependencies | |
| uses: ./.github/actions/install-dependencies | |
| with: | |
| uv-sync-extra-args: "--group ci" | |
| - name: Create `.env` | |
| shell: bash | |
| run: cp .env.example .env | |
| - name: Run Django Tests | |
| run: | | |
| uv run manage.py collectstatic --no-input | |
| uv run coverage run manage.py test | |
| uv run coverage xml | |
| - name: Upload to Codecov | |
| uses: codecov/codecov-action@v3 | |
| with: | |
| token: ${{ secrets.CODECOV_TOKEN }} | |
| file: ./coverage.xml |