refactor: update the sidebar and remove the topbar #262
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: Backend Check | |
| on: | |
| push: | |
| branches: | |
| - '*' | |
| - 'main' | |
| paths: | |
| - 'backend/**.py' | |
| - 'backend/uv.lock' | |
| - 'backend/pyproject.toml' | |
| - 'Dockerfile*' | |
| - 'docker-compose*.yml' | |
| - '.github/workflows/check_backend.yml' | |
| pull_request: | |
| branches: | |
| - 'main' | |
| paths: | |
| - 'backend/**.py' | |
| - 'backend/uv.lock' | |
| - 'backend/pyproject.toml' | |
| - 'Dockerfile*' | |
| - 'docker-compose*.yml' | |
| - '.github/workflows/check_backend.yml' | |
| jobs: | |
| formatting: | |
| name: Run formatting check | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Check out Git repository | |
| uses: actions/checkout@v5 | |
| - name: Install uv | |
| uses: astral-sh/setup-uv@v6 | |
| with: | |
| enable-cache: 'true' | |
| cache-suffix: 'formatting' | |
| cache-dependency-glob: | | |
| backend/uv.lock | |
| backend/pyproject.toml | |
| - name: Install Ruff with uv | |
| working-directory: ./backend | |
| run: | | |
| uv sync --only-group ruff | |
| - name: Check formatting with Ruff | |
| working-directory: ./backend | |
| run: | | |
| uv run ruff format --check . | |
| linting: | |
| name: Run linting check | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Check out Git repository | |
| uses: actions/checkout@v5 | |
| - name: Install uv | |
| uses: astral-sh/setup-uv@v6 | |
| with: | |
| enable-cache: 'true' | |
| cache-suffix: 'linting' | |
| cache-dependency-glob: | | |
| backend/uv.lock | |
| backend/pyproject.toml | |
| - name: Install Ruff with uv | |
| working-directory: ./backend | |
| run: | | |
| uv sync --only-group ruff | |
| - name: Lint files using Ruff | |
| working-directory: ./backend | |
| run: | | |
| uv run ruff check --select=I . | |
| uv run ruff check . | |
| checking_migrations: | |
| name: Check for migrations | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Check out Git repository | |
| uses: actions/checkout@v5 | |
| - name: Install uv | |
| uses: astral-sh/setup-uv@v6 | |
| with: | |
| enable-cache: 'true' | |
| cache-suffix: 'checking_migrations' | |
| cache-dependency-glob: | | |
| backend/uv.lock | |
| backend/pyproject.toml | |
| - name: Install dependencies | |
| working-directory: ./backend | |
| run: | | |
| uv sync | |
| - name: Check for migrations | |
| working-directory: ./backend | |
| run: | | |
| set -a | |
| uv run ./manage.py makemigrations --check --dry-run | |
| set +a | |
| tests: | |
| name: Run backend tests | |
| runs-on: ubuntu-latest | |
| timeout-minutes: 5 | |
| services: | |
| postgres: | |
| image: postgres:17.5 | |
| env: | |
| POSTGRES_DB: paul | |
| POSTGRES_USER: user | |
| POSTGRES_PASSWORD: secret | |
| ports: | |
| - 5432:5432 | |
| steps: | |
| - name: Check out Git repository | |
| uses: actions/checkout@v5 | |
| - name: Install uv | |
| uses: astral-sh/setup-uv@v6 | |
| with: | |
| enable-cache: 'true' | |
| cache-suffix: 'tests' | |
| cache-dependency-glob: | | |
| backend/uv.lock | |
| backend/pyproject.toml | |
| - name: Install dependencies | |
| working-directory: ./backend | |
| run: | | |
| uv sync --frozen | |
| sudo apt-get install gettext | |
| uv run ./manage.py compilemessages | |
| - name: Run tests | |
| env: | |
| ENV_FILE_NAME: ".env.example" | |
| DATABASE_NAME: "paul" | |
| DATABASE_USER: "user" | |
| DATABASE_PASSWORD: "secret" | |
| DATABASE_HOST: "0.0.0.0" | |
| DATABASE_PORT: "5432" | |
| working-directory: ./backend | |
| run: | | |
| uv run ./manage.py test --parallel | |
| codeql_analysis: | |
| name: Analyze code using CodeQL | |
| runs-on: ubuntu-latest | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| language: [ 'python' ] | |
| steps: | |
| - name: Checkout repository | |
| uses: actions/checkout@v5 | |
| - name: Initialize CodeQL | |
| uses: github/codeql-action/init@v3 | |
| with: | |
| languages: ${{ matrix.language }} | |
| - name: Perform CodeQL Analysis | |
| uses: github/codeql-action/analyze@v3 |