feat: allow username/email login and add PostHog hooks #43
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: | |
| pull_request: | |
| jobs: | |
| test: | |
| runs-on: ubuntu-latest | |
| services: | |
| postgres: | |
| image: rasulkireev/custom-postgres:18 | |
| env: | |
| POSTGRES_DB: clawrn | |
| POSTGRES_USER: clawrn | |
| POSTGRES_PASSWORD: clawrn | |
| ports: | |
| - 5432:5432 | |
| options: >- | |
| --health-cmd "pg_isready -U clawrn -d clawrn" | |
| --health-interval 5s | |
| --health-timeout 5s | |
| --health-retries 20 | |
| redis: | |
| image: redis:7 | |
| ports: | |
| - 6379:6379 | |
| options: >- | |
| --health-cmd "redis-cli ping" | |
| --health-interval 5s | |
| --health-timeout 5s | |
| --health-retries 20 | |
| env: | |
| ENVIRONMENT: test | |
| DJANGO_READ_DOT_ENV: "0" | |
| DEBUG: "0" | |
| SECRET_KEY: test-secret-key | |
| SITE_URL: "https://testserver" | |
| ALLOWED_HOSTS: "localhost,127.0.0.1" | |
| POSTGRES_DB: clawrn | |
| POSTGRES_USER: clawrn | |
| POSTGRES_PASSWORD: clawrn | |
| POSTGRES_HOST: 127.0.0.1 | |
| POSTGRES_PORT: 5432 | |
| REDIS_HOST: 127.0.0.1 | |
| REDIS_PORT: 6379 | |
| REDIS_PASSWORD: "" | |
| REDIS_DB: 0 | |
| # Avoid external email providers in CI | |
| MAILGUN_API_KEY: "" | |
| AWS_S3_ENDPOINT_URL: "" | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Install uv | |
| uses: astral-sh/setup-uv@v6 | |
| with: | |
| version: "latest" | |
| - name: Set up Python (uv-managed) | |
| run: uv python install 3.14 | |
| - name: Check lockfile is up-to-date (pyproject.toml ↔ uv.lock) | |
| run: uv lock --check | |
| - name: Sync dependencies | |
| run: uv sync --frozen | |
| - name: Create dummy webpack manifest (tests) | |
| run: | | |
| mkdir -p frontend/build | |
| cat > frontend/build/manifest.json <<'EOF' | |
| { | |
| "entrypoints": { | |
| "index": { | |
| "assets": { | |
| "js": [], | |
| "css": [] | |
| } | |
| } | |
| } | |
| } | |
| EOF | |
| - name: Django checks | |
| run: uv run python manage.py check | |
| - name: Pytest | |
| run: uv run pytest -q |