Force latest image #81
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: | |
| pull_request: | |
| branches: [main, "release/**"] | |
| permissions: | |
| contents: read | |
| jobs: | |
| build-backend: | |
| name: Build Backend Image | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v5 | |
| - uses: docker/setup-buildx-action@v3 | |
| - uses: docker/build-push-action@v6 | |
| with: | |
| context: ./backend | |
| file: ./backend/Dockerfile | |
| push: false | |
| cache-from: type=gha,scope=backend | |
| cache-to: type=gha,mode=max,scope=backend | |
| build-worker: | |
| name: Build Worker Image | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v5 | |
| - uses: docker/setup-buildx-action@v3 | |
| - uses: docker/build-push-action@v6 | |
| with: | |
| context: ./backend | |
| file: ./backend/Dockerfile.worker | |
| push: false | |
| cache-from: type=gha,scope=worker | |
| cache-to: type=gha,mode=max,scope=worker | |
| build-frontend: | |
| name: Build Frontend Image | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v5 | |
| - uses: docker/setup-buildx-action@v3 | |
| - uses: docker/build-push-action@v6 | |
| with: | |
| context: ./frontend | |
| file: ./frontend/Dockerfile | |
| push: false | |
| cache-from: type=gha,scope=frontend | |
| cache-to: type=gha,mode=max,scope=frontend | |
| test-backend: | |
| name: Backend Tests | |
| runs-on: ubuntu-latest | |
| services: | |
| postgres: | |
| image: postgres:18 | |
| env: | |
| POSTGRES_USER: intercept_user | |
| POSTGRES_PASSWORD: intercept_password | |
| POSTGRES_DB: intercept_case_db | |
| ports: | |
| - 5432:5432 | |
| options: >- | |
| --health-cmd pg_isready | |
| --health-interval 10s | |
| --health-timeout 5s | |
| --health-retries 5 | |
| steps: | |
| - uses: actions/checkout@v5 | |
| - uses: actions/setup-python@v6 | |
| with: | |
| python-version: "3.11" | |
| cache: pip | |
| - name: Install dependencies | |
| working-directory: backend | |
| run: pip install -r requirements-test.txt | |
| - name: Audit dependencies | |
| working-directory: backend | |
| run: | | |
| pip install pip-audit | |
| pip-audit -r requirements.txt | |
| - name: Run tests | |
| working-directory: backend | |
| env: | |
| TEST_DATABASE_URL: postgresql+asyncpg://intercept_user:intercept_password@localhost:5432/intercept_case_db | |
| SECRET_KEY: ci-test-secret-key | |
| SKIP_DOCKER_TEST_SETUP: "1" | |
| CSRF_ENABLED: "false" | |
| run: pytest | |
| test-frontend: | |
| name: Frontend Tests | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v5 | |
| - uses: actions/setup-node@v6 | |
| with: | |
| node-version: 24 | |
| cache: npm | |
| cache-dependency-path: frontend/package-lock.json | |
| - name: Install dependencies | |
| working-directory: frontend | |
| run: npm install | |
| - name: Type check | |
| working-directory: frontend | |
| run: npx tsc --noEmit | |
| - name: Run tests | |
| working-directory: frontend | |
| run: npm test |