Add nginx frontend #196
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: | |
| branches: [main] | |
| pull_request: | |
| branches: [main] | |
| workflow_call: | |
| jobs: | |
| backend-checks: | |
| name: Backend checks | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout code | |
| uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0 | |
| - name: Set up Python | |
| uses: actions/setup-python@e797f83bcb11b83ae66e0230d6156d7c80228e7c # v6.0.0 | |
| with: | |
| python-version: "3.12" | |
| - name: Install uv | |
| uses: astral-sh/setup-uv@b75a909f75acd358c2196fb9a5f1299a9a8868a4 # v6.7.0 | |
| - name: Install dependencies | |
| run: uv sync --group dev | |
| - name: Run ruff check | |
| run: | | |
| uv run ruff check | |
| - name: Run ruff format check | |
| run: | | |
| uv run ruff format --check | |
| - name: Run mypy type check | |
| run: | | |
| uv run mypy src | |
| backend-test: | |
| name: Backend tests | |
| runs-on: ubuntu-latest | |
| services: | |
| postgres: | |
| image: postgres:16 | |
| env: | |
| POSTGRES_USER: postgres | |
| POSTGRES_PASSWORD: postgres | |
| POSTGRES_DB: firetower_test | |
| ports: | |
| - 5432:5432 | |
| options: >- | |
| --health-cmd pg_isready | |
| --health-interval 10s | |
| --health-timeout 5s | |
| --health-retries 5 | |
| env: | |
| DJANGO_PG_DB: firetower_test | |
| DJANGO_PG_USER: postgres | |
| DJANGO_PG_PASS: postgres | |
| DJANGO_PG_HOST: localhost | |
| DJANGO_PG_PORT: 5432 | |
| steps: | |
| - name: Checkout code | |
| uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0 | |
| - name: Set up Python | |
| uses: actions/setup-python@e797f83bcb11b83ae66e0230d6156d7c80228e7c # v6.0.0 | |
| with: | |
| python-version: "3.12" | |
| - name: Install uv | |
| uses: astral-sh/setup-uv@b75a909f75acd358c2196fb9a5f1299a9a8868a4 # v6.7.0 | |
| - name: Install dependencies | |
| run: uv sync --group dev | |
| - name: Run Python tests | |
| run: | | |
| cd src | |
| uv run pytest --verbose | |
| frontend-check: | |
| name: Frontend checks | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout code | |
| uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0 | |
| - name: Set up Bun | |
| uses: oven-sh/setup-bun@735343b667d3e6f658f44d0eca948eb6282f2b76 # v2.0.2 | |
| - name: Install dependencies | |
| run: | | |
| cd frontend | |
| bun install --frozen-lockfile | |
| - name: Lint frontend | |
| run: | | |
| cd frontend | |
| bun run lint | |
| - name: Check frontend formatting | |
| run: | | |
| cd frontend | |
| bun run format:check | |
| frontend-test: | |
| name: Frontend tests | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout code | |
| uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0 | |
| - name: Set up Bun | |
| uses: oven-sh/setup-bun@735343b667d3e6f658f44d0eca948eb6282f2b76 # v2.0.2 | |
| - name: Install dependencies | |
| run: | | |
| cd frontend | |
| bun install --frozen-lockfile | |
| - name: Run frontend tests | |
| run: | | |
| cd frontend | |
| bun test | |
| - name: Type-check frontend | |
| run: | | |
| cd frontend | |
| bun run type-check |