add caddy and nginx reverse proxy for amazon ec2 / cf WAF #34
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: Code Quality and Testing | |
| on: | |
| pull_request: | |
| branches: [main] | |
| paths-ignore: | |
| - "docs/**" | |
| - "**/*.md" | |
| - "LICENSE" | |
| - "docker-compose.yaml" | |
| - "backend/Dockerfile" | |
| - "backend/.dockerignore" | |
| - "backend/.env.example" | |
| pull_request_review: | |
| types: [submitted] | |
| push: | |
| branches: [main] | |
| paths-ignore: | |
| - "docs/**" | |
| - "**/*.md" | |
| - "LICENSE" | |
| - "docker-compose.yaml" | |
| - "backend/Dockerfile" | |
| - "backend/.dockerignore" | |
| - "backend/.env.example" | |
| workflow_dispatch: | |
| permissions: | |
| contents: read | |
| jobs: | |
| lint: | |
| name: Code Quality Check | |
| runs-on: ubuntu-latest | |
| if: github.event_name != 'pull_request_review' | |
| defaults: | |
| run: | |
| working-directory: backend | |
| steps: | |
| - name: Checkout Repository | |
| uses: actions/checkout@v7 | |
| - name: Set up uv | |
| uses: astral-sh/setup-uv@v7 | |
| with: | |
| python-version: "3.13" | |
| - name: Install dependencies | |
| run: uv sync | |
| - name: Run pre-commit hooks | |
| run: uv run pre-commit run --all-files | |
| test-unit: | |
| name: Python Unit Tests | |
| runs-on: ubuntu-latest | |
| needs: lint | |
| if: github.event_name != 'pull_request_review' | |
| defaults: | |
| run: | |
| working-directory: backend | |
| steps: | |
| - name: Checkout Repository | |
| uses: actions/checkout@v7 | |
| - name: Set up uv | |
| uses: astral-sh/setup-uv@v7 | |
| with: | |
| python-version: "3.13" | |
| - name: Install dependencies | |
| run: uv sync | |
| - name: Run unit tests | |
| run: uv run pytest tests/unit -v | |
| test-integration: | |
| name: Python Integration Tests | |
| runs-on: ubuntu-latest | |
| if: | | |
| github.event_name == 'push' || | |
| github.event_name == 'workflow_dispatch' || | |
| (github.event_name == 'pull_request_review' && github.event.review.state == 'approved') | |
| defaults: | |
| run: | |
| working-directory: backend | |
| env: | |
| DATABASE_URL: ${{ secrets.DATABASE_URL }} | |
| steps: | |
| - name: Checkout Repository | |
| uses: actions/checkout@v7 | |
| - name: Set up uv | |
| uses: astral-sh/setup-uv@v7 | |
| with: | |
| python-version: "3.13" | |
| - name: Install dependencies | |
| run: uv sync | |
| - name: Run integration tests | |
| run: uv run pytest tests/integration -v | |
| frontend: | |
| name: Frontend Quality Check | |
| runs-on: ubuntu-latest | |
| if: github.event_name != 'pull_request_review' | |
| defaults: | |
| run: | |
| working-directory: frontend | |
| steps: | |
| - name: Checkout Repository | |
| uses: actions/checkout@v7 | |
| - name: Set up pnpm | |
| uses: pnpm/action-setup@v6 | |
| with: | |
| version: "11.9.0" | |
| - name: Set up Node.js | |
| uses: actions/setup-node@v6 | |
| with: | |
| node-version: "22" | |
| cache: "pnpm" | |
| cache-dependency-path: frontend/pnpm-lock.yaml | |
| - name: Install dependencies | |
| run: pnpm install | |
| - name: Run formatter | |
| run: pnpm format | |
| - name: Run build | |
| run: pnpm build |