feat: add version-upgrade tooling #409
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] | |
| concurrency: | |
| group: ${{ github.workflow }}-${{ github.ref }} | |
| cancel-in-progress: true | |
| jobs: | |
| # ============================================ | |
| # Stage 1: Core CI (lint, type-check, test, security) | |
| # ============================================ | |
| lint: | |
| name: Lint | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v7 | |
| - name: Install uv | |
| uses: astral-sh/setup-uv@v7 | |
| with: | |
| version: "latest" | |
| - name: Set up Python | |
| uses: actions/setup-python@v6 | |
| with: | |
| python-version: "3.14" | |
| - name: Install dependencies | |
| run: uv sync --extra dev | |
| - name: Run ruff check | |
| run: uv run ruff check . | |
| - name: Run ruff format check | |
| run: uv run ruff format --check . | |
| type-check: | |
| name: Type Check | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v7 | |
| - name: Install uv | |
| uses: astral-sh/setup-uv@v7 | |
| with: | |
| version: "latest" | |
| - name: Set up Python | |
| uses: actions/setup-python@v6 | |
| with: | |
| python-version: "3.14" | |
| - name: Install dependencies | |
| run: uv sync --extra dev | |
| - name: Run ty | |
| run: uv run ty check | |
| test: | |
| name: Test (Python ${{ matrix.python-version }}) | |
| runs-on: ubuntu-latest | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| python-version: ["3.11", "3.12", "3.13"] | |
| steps: | |
| - uses: actions/checkout@v7 | |
| - name: Install uv | |
| uses: astral-sh/setup-uv@v7 | |
| with: | |
| version: "latest" | |
| - name: Set up Python ${{ matrix.python-version }} | |
| uses: actions/setup-python@v6 | |
| with: | |
| python-version: ${{ matrix.python-version }} | |
| - name: Install dependencies | |
| run: uv sync --extra dev | |
| - name: Run tests with coverage | |
| run: uv run pytest --cov=fastapi_gen --cov-report=xml --cov-report=term-missing | |
| - name: Upload coverage to Codecov | |
| if: matrix.python-version == '3.12' | |
| uses: codecov/codecov-action@v7 | |
| with: | |
| file: ./coverage.xml | |
| fail_ci_if_error: false | |
| security: | |
| name: Security Scan | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v7 | |
| - name: Install uv | |
| uses: astral-sh/setup-uv@v7 | |
| with: | |
| version: "latest" | |
| - name: Set up Python | |
| uses: actions/setup-python@v6 | |
| with: | |
| python-version: "3.14" | |
| - name: Install dependencies | |
| run: uv sync --extra dev | |
| - name: Install pip-audit | |
| run: uv pip install pip-audit | |
| - name: Run pip-audit | |
| run: uv run pip-audit --progress-spinner=off --ignore-vuln CVE-2026-4539 --ignore-vuln CVE-2026-25645 --ignore-vuln CVE-2025-71176 --ignore-vuln CVE-2026-3219 --ignore-vuln CVE-2026-45409 | |
| # ============================================ | |
| # Stage 2: Generated Project Tests | |
| # ============================================ | |
| generate-minimal: | |
| name: Template - Minimal | |
| needs: [lint, type-check] | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v7 | |
| - name: Install uv | |
| uses: astral-sh/setup-uv@v7 | |
| with: | |
| version: "latest" | |
| - name: Set up Python | |
| uses: actions/setup-python@v6 | |
| with: | |
| python-version: "3.14" | |
| - name: Install generator | |
| run: uv sync | |
| - name: Generate minimal project | |
| run: | | |
| mkdir -p /tmp/projects | |
| uv run fastapi-fullstack create test_minimal --minimal -o /tmp/projects | |
| - name: Install generated project | |
| working-directory: /tmp/projects/test_minimal/backend | |
| run: uv sync --dev | |
| - name: Run linting | |
| working-directory: /tmp/projects/test_minimal/backend | |
| run: | | |
| uv run ruff check . | |
| uv run ruff format --check . | |
| - name: Run type check | |
| working-directory: /tmp/projects/test_minimal/backend | |
| run: uv run ty check | |
| - name: Run tests | |
| working-directory: /tmp/projects/test_minimal/backend | |
| run: uv run pytest -v | |
| generate-postgresql: | |
| name: Template - PostgreSQL + Celery + RAG | |
| needs: [lint, type-check] | |
| runs-on: ubuntu-latest | |
| services: | |
| postgres: | |
| image: postgres:16 | |
| env: | |
| POSTGRES_USER: postgres | |
| POSTGRES_PASSWORD: postgres | |
| POSTGRES_DB: test_db | |
| ports: | |
| - 5432:5432 | |
| options: >- | |
| --health-cmd pg_isready | |
| --health-interval 10s | |
| --health-timeout 5s | |
| --health-retries 5 | |
| redis: | |
| image: redis:7 | |
| ports: | |
| - 6379:6379 | |
| options: >- | |
| --health-cmd "redis-cli ping" | |
| --health-interval 10s | |
| --health-timeout 5s | |
| --health-retries 5 | |
| steps: | |
| - uses: actions/checkout@v7 | |
| - name: Install uv | |
| uses: astral-sh/setup-uv@v7 | |
| with: | |
| version: "latest" | |
| - name: Set up Python | |
| uses: actions/setup-python@v6 | |
| with: | |
| python-version: "3.14" | |
| - name: Install generator | |
| run: uv sync | |
| - name: Generate PostgreSQL project with RAG | |
| run: | | |
| mkdir -p /tmp/projects | |
| uv run fastapi-fullstack create test_pg \ | |
| --database postgresql \ | |
| --task-queue celery \ | |
| --redis \ | |
| --rag \ | |
| --admin-panel \ | |
| --session-management \ | |
| --frontend nextjs \ | |
| -o /tmp/projects | |
| - name: Install backend | |
| working-directory: /tmp/projects/test_pg/backend | |
| run: uv sync --dev | |
| - name: Run backend linting | |
| working-directory: /tmp/projects/test_pg/backend | |
| run: | | |
| uv run ruff check . | |
| uv run ruff format --check . | |
| - name: Run backend type check | |
| working-directory: /tmp/projects/test_pg/backend | |
| run: uv run ty check | |
| - name: Run backend tests | |
| working-directory: /tmp/projects/test_pg/backend | |
| env: | |
| POSTGRES_HOST: localhost | |
| POSTGRES_PORT: 5432 | |
| POSTGRES_USER: postgres | |
| POSTGRES_PASSWORD: postgres | |
| POSTGRES_DB: test_db | |
| REDIS_HOST: localhost | |
| REDIS_PORT: 6379 | |
| SECRET_KEY: test-secret-key-for-ci-that-is-long-enough | |
| run: uv run pytest -v | |
| generate-pg-billing: | |
| name: Template - PostgreSQL + Teams + Billing | |
| needs: [lint, type-check] | |
| runs-on: ubuntu-latest | |
| services: | |
| postgres: | |
| image: postgres:16 | |
| env: | |
| POSTGRES_USER: postgres | |
| POSTGRES_PASSWORD: postgres | |
| POSTGRES_DB: test_db | |
| ports: | |
| - 5432:5432 | |
| options: >- | |
| --health-cmd pg_isready | |
| --health-interval 10s | |
| --health-timeout 5s | |
| --health-retries 5 | |
| redis: | |
| image: redis:7 | |
| ports: | |
| - 6379:6379 | |
| options: >- | |
| --health-cmd "redis-cli ping" | |
| --health-interval 10s | |
| --health-timeout 5s | |
| --health-retries 5 | |
| steps: | |
| - uses: actions/checkout@v7 | |
| - name: Install uv | |
| uses: astral-sh/setup-uv@v7 | |
| with: | |
| version: "latest" | |
| - name: Set up Python | |
| uses: actions/setup-python@v6 | |
| with: | |
| python-version: "3.14" | |
| - name: Install generator | |
| run: uv sync | |
| - name: Generate project with billing (no credits) | |
| run: | | |
| mkdir -p /tmp/projects | |
| uv run fastapi-fullstack create test_pg_billing \ | |
| --database postgresql \ | |
| --teams \ | |
| --billing \ | |
| --redis \ | |
| --admin-panel \ | |
| -o /tmp/projects | |
| - name: Install backend | |
| working-directory: /tmp/projects/test_pg_billing/backend | |
| run: uv sync --dev | |
| - name: Run linting | |
| working-directory: /tmp/projects/test_pg_billing/backend | |
| run: | | |
| uv run ruff check . | |
| uv run ruff format --check . | |
| - name: Run type check | |
| working-directory: /tmp/projects/test_pg_billing/backend | |
| run: uv run ty check | |
| - name: Run tests | |
| working-directory: /tmp/projects/test_pg_billing/backend | |
| env: | |
| POSTGRES_HOST: localhost | |
| POSTGRES_PORT: 5432 | |
| POSTGRES_USER: postgres | |
| POSTGRES_PASSWORD: postgres | |
| POSTGRES_DB: test_db | |
| REDIS_HOST: localhost | |
| REDIS_PORT: 6379 | |
| SECRET_KEY: test-secret-key-for-ci-that-is-long-enough | |
| run: uv run pytest -v | |
| generate-pg-billing-credits: | |
| name: Template - PostgreSQL + Teams + Billing + Credits | |
| needs: [lint, type-check] | |
| runs-on: ubuntu-latest | |
| services: | |
| postgres: | |
| image: postgres:16 | |
| env: | |
| POSTGRES_USER: postgres | |
| POSTGRES_PASSWORD: postgres | |
| POSTGRES_DB: test_db | |
| ports: | |
| - 5432:5432 | |
| options: >- | |
| --health-cmd pg_isready | |
| --health-interval 10s | |
| --health-timeout 5s | |
| --health-retries 5 | |
| redis: | |
| image: redis:7 | |
| ports: | |
| - 6379:6379 | |
| options: >- | |
| --health-cmd "redis-cli ping" | |
| --health-interval 10s | |
| --health-timeout 5s | |
| --health-retries 5 | |
| steps: | |
| - uses: actions/checkout@v7 | |
| - name: Install uv | |
| uses: astral-sh/setup-uv@v7 | |
| with: | |
| version: "latest" | |
| - name: Set up Python | |
| uses: actions/setup-python@v6 | |
| with: | |
| python-version: "3.14" | |
| - name: Install generator | |
| run: uv sync | |
| - name: Generate project with billing + credits | |
| run: | | |
| mkdir -p /tmp/projects | |
| uv run fastapi-fullstack create test_pg_credits \ | |
| --database postgresql \ | |
| --teams \ | |
| --billing \ | |
| --credits \ | |
| --redis \ | |
| --admin-panel \ | |
| -o /tmp/projects | |
| - name: Install backend | |
| working-directory: /tmp/projects/test_pg_credits/backend | |
| run: uv sync --dev | |
| - name: Run linting | |
| working-directory: /tmp/projects/test_pg_credits/backend | |
| run: | | |
| uv run ruff check . | |
| uv run ruff format --check . | |
| - name: Run type check | |
| working-directory: /tmp/projects/test_pg_credits/backend | |
| run: uv run ty check | |
| - name: Run tests | |
| working-directory: /tmp/projects/test_pg_credits/backend | |
| env: | |
| POSTGRES_HOST: localhost | |
| POSTGRES_PORT: 5432 | |
| POSTGRES_USER: postgres | |
| POSTGRES_PASSWORD: postgres | |
| POSTGRES_DB: test_db | |
| REDIS_HOST: localhost | |
| REDIS_PORT: 6379 | |
| SECRET_KEY: test-secret-key-for-ci-that-is-long-enough | |
| run: uv run pytest -v | |
| generate-pg-langchain: | |
| name: Template - PostgreSQL + LangChain | |
| needs: [lint, type-check] | |
| runs-on: ubuntu-latest | |
| services: | |
| postgres: | |
| image: postgres:16 | |
| env: | |
| POSTGRES_USER: postgres | |
| POSTGRES_PASSWORD: postgres | |
| POSTGRES_DB: test_db | |
| ports: | |
| - 5432:5432 | |
| options: >- | |
| --health-cmd pg_isready | |
| --health-interval 10s | |
| --health-timeout 5s | |
| --health-retries 5 | |
| steps: | |
| - uses: actions/checkout@v7 | |
| - name: Install uv | |
| uses: astral-sh/setup-uv@v7 | |
| with: | |
| version: "latest" | |
| - name: Set up Python | |
| uses: actions/setup-python@v6 | |
| with: | |
| python-version: "3.14" | |
| - name: Install generator | |
| run: uv sync | |
| - name: Generate project with LangChain | |
| run: | | |
| mkdir -p /tmp/projects | |
| uv run fastapi-fullstack create test_pg_langchain \ | |
| --database postgresql \ | |
| --ai-framework langchain \ | |
| -o /tmp/projects | |
| - name: Install backend | |
| working-directory: /tmp/projects/test_pg_langchain/backend | |
| run: uv sync --dev | |
| - name: Run linting | |
| working-directory: /tmp/projects/test_pg_langchain/backend | |
| run: | | |
| uv run ruff check . | |
| uv run ruff format --check . | |
| - name: Run type check | |
| working-directory: /tmp/projects/test_pg_langchain/backend | |
| run: uv run ty check | |
| - name: Run tests | |
| working-directory: /tmp/projects/test_pg_langchain/backend | |
| env: | |
| POSTGRES_HOST: localhost | |
| POSTGRES_PORT: 5432 | |
| POSTGRES_USER: postgres | |
| POSTGRES_PASSWORD: postgres | |
| POSTGRES_DB: test_db | |
| SECRET_KEY: test-secret-key-for-ci-that-is-long-enough | |
| run: uv run pytest -v | |
| generate-pg-langgraph: | |
| name: Template - PostgreSQL + LangGraph | |
| needs: [lint, type-check] | |
| runs-on: ubuntu-latest | |
| services: | |
| postgres: | |
| image: postgres:16 | |
| env: | |
| POSTGRES_USER: postgres | |
| POSTGRES_PASSWORD: postgres | |
| POSTGRES_DB: test_db | |
| ports: | |
| - 5432:5432 | |
| options: >- | |
| --health-cmd pg_isready | |
| --health-interval 10s | |
| --health-timeout 5s | |
| --health-retries 5 | |
| steps: | |
| - uses: actions/checkout@v7 | |
| - name: Install uv | |
| uses: astral-sh/setup-uv@v7 | |
| with: | |
| version: "latest" | |
| - name: Set up Python | |
| uses: actions/setup-python@v6 | |
| with: | |
| python-version: "3.14" | |
| - name: Install generator | |
| run: uv sync | |
| - name: Generate project with LangGraph | |
| run: | | |
| mkdir -p /tmp/projects | |
| uv run fastapi-fullstack create test_pg_langgraph \ | |
| --database postgresql \ | |
| --ai-framework langgraph \ | |
| -o /tmp/projects | |
| - name: Install backend | |
| working-directory: /tmp/projects/test_pg_langgraph/backend | |
| run: uv sync --dev | |
| - name: Run linting | |
| working-directory: /tmp/projects/test_pg_langgraph/backend | |
| run: | | |
| uv run ruff check . | |
| uv run ruff format --check . | |
| - name: Run type check | |
| working-directory: /tmp/projects/test_pg_langgraph/backend | |
| run: uv run ty check | |
| - name: Run tests | |
| working-directory: /tmp/projects/test_pg_langgraph/backend | |
| env: | |
| POSTGRES_HOST: localhost | |
| POSTGRES_PORT: 5432 | |
| POSTGRES_USER: postgres | |
| POSTGRES_PASSWORD: postgres | |
| POSTGRES_DB: test_db | |
| SECRET_KEY: test-secret-key-for-ci-that-is-long-enough | |
| run: uv run pytest -v | |
| generate-pg-deep-research: | |
| name: Template - PostgreSQL + Deep Research | |
| needs: [lint, type-check] | |
| runs-on: ubuntu-latest | |
| services: | |
| postgres: | |
| image: postgres:16 | |
| env: | |
| POSTGRES_USER: postgres | |
| POSTGRES_PASSWORD: postgres | |
| POSTGRES_DB: test_db | |
| ports: | |
| - 5432:5432 | |
| options: >- | |
| --health-cmd pg_isready | |
| --health-interval 10s | |
| --health-timeout 5s | |
| --health-retries 5 | |
| steps: | |
| - uses: actions/checkout@v7 | |
| - name: Install uv | |
| uses: astral-sh/setup-uv@v7 | |
| with: | |
| version: "latest" | |
| - name: Set up Python | |
| uses: actions/setup-python@v6 | |
| with: | |
| python-version: "3.14" | |
| - name: Install generator | |
| run: uv sync | |
| - name: Generate project with deep research | |
| run: | | |
| mkdir -p /tmp/projects | |
| uv run fastapi-fullstack create test_deep_research \ | |
| --database postgresql \ | |
| --ai-framework pydantic_ai \ | |
| --deep-research \ | |
| -o /tmp/projects | |
| - name: Install backend | |
| working-directory: /tmp/projects/test_deep_research/backend | |
| run: uv sync --dev | |
| - name: Run linting | |
| working-directory: /tmp/projects/test_deep_research/backend | |
| run: | | |
| uv run ruff check . | |
| uv run ruff format --check . | |
| - name: Run type check | |
| working-directory: /tmp/projects/test_deep_research/backend | |
| run: uv run ty check | |
| - name: Run tests | |
| working-directory: /tmp/projects/test_deep_research/backend | |
| env: | |
| POSTGRES_HOST: localhost | |
| POSTGRES_PORT: 5432 | |
| POSTGRES_USER: postgres | |
| POSTGRES_PASSWORD: postgres | |
| POSTGRES_DB: test_db | |
| SECRET_KEY: test-secret-key-for-ci-that-is-long-enough | |
| run: uv run pytest -v | |
| generate-pg-taskiq: | |
| name: Template - PostgreSQL + Taskiq | |
| needs: [lint, type-check] | |
| runs-on: ubuntu-latest | |
| services: | |
| postgres: | |
| image: postgres:16 | |
| env: | |
| POSTGRES_USER: postgres | |
| POSTGRES_PASSWORD: postgres | |
| POSTGRES_DB: test_db | |
| ports: | |
| - 5432:5432 | |
| options: >- | |
| --health-cmd pg_isready | |
| --health-interval 10s | |
| --health-timeout 5s | |
| --health-retries 5 | |
| redis: | |
| image: redis:7 | |
| ports: | |
| - 6379:6379 | |
| options: >- | |
| --health-cmd "redis-cli ping" | |
| --health-interval 10s | |
| --health-timeout 5s | |
| --health-retries 5 | |
| steps: | |
| - uses: actions/checkout@v7 | |
| - name: Install uv | |
| uses: astral-sh/setup-uv@v7 | |
| with: | |
| version: "latest" | |
| - name: Set up Python | |
| uses: actions/setup-python@v6 | |
| with: | |
| python-version: "3.14" | |
| - name: Install generator | |
| run: uv sync | |
| - name: Generate project with Taskiq | |
| run: | | |
| mkdir -p /tmp/projects | |
| uv run fastapi-fullstack create test_pg_taskiq \ | |
| --database postgresql \ | |
| --task-queue taskiq \ | |
| --redis \ | |
| -o /tmp/projects | |
| - name: Install backend | |
| working-directory: /tmp/projects/test_pg_taskiq/backend | |
| run: uv sync --dev | |
| - name: Run linting | |
| working-directory: /tmp/projects/test_pg_taskiq/backend | |
| run: | | |
| uv run ruff check . | |
| uv run ruff format --check . | |
| - name: Run type check | |
| working-directory: /tmp/projects/test_pg_taskiq/backend | |
| run: uv run ty check | |
| - name: Run tests | |
| working-directory: /tmp/projects/test_pg_taskiq/backend | |
| env: | |
| POSTGRES_HOST: localhost | |
| POSTGRES_PORT: 5432 | |
| POSTGRES_USER: postgres | |
| POSTGRES_PASSWORD: postgres | |
| POSTGRES_DB: test_db | |
| REDIS_HOST: localhost | |
| REDIS_PORT: 6379 | |
| SECRET_KEY: test-secret-key-for-ci-that-is-long-enough | |
| run: uv run pytest -v | |
| generate-pg-deepagents: | |
| name: Template - PostgreSQL + DeepAgents | |
| needs: [lint, type-check] | |
| runs-on: ubuntu-latest | |
| services: | |
| postgres: | |
| image: postgres:16 | |
| env: | |
| POSTGRES_USER: postgres | |
| POSTGRES_PASSWORD: postgres | |
| POSTGRES_DB: test_db | |
| ports: | |
| - 5432:5432 | |
| options: >- | |
| --health-cmd pg_isready | |
| --health-interval 10s | |
| --health-timeout 5s | |
| --health-retries 5 | |
| steps: | |
| - uses: actions/checkout@v7 | |
| - name: Install uv | |
| uses: astral-sh/setup-uv@v7 | |
| with: | |
| version: "latest" | |
| - name: Set up Python | |
| uses: actions/setup-python@v6 | |
| with: | |
| python-version: "3.14" | |
| - name: Install generator | |
| run: uv sync | |
| - name: Generate project with DeepAgents | |
| run: | | |
| mkdir -p /tmp/projects | |
| uv run fastapi-fullstack create test_deepagents \ | |
| --database postgresql \ | |
| --ai-framework deepagents \ | |
| -o /tmp/projects | |
| - name: Install backend | |
| working-directory: /tmp/projects/test_deepagents/backend | |
| run: uv sync --dev | |
| - name: Run linting | |
| working-directory: /tmp/projects/test_deepagents/backend | |
| run: | | |
| uv run ruff check . | |
| uv run ruff format --check . | |
| - name: Run type check | |
| working-directory: /tmp/projects/test_deepagents/backend | |
| run: uv run ty check | |
| - name: Run tests | |
| working-directory: /tmp/projects/test_deepagents/backend | |
| env: | |
| POSTGRES_HOST: localhost | |
| POSTGRES_PORT: 5432 | |
| POSTGRES_USER: postgres | |
| POSTGRES_PASSWORD: postgres | |
| POSTGRES_DB: test_db | |
| SECRET_KEY: test-secret-key-for-ci-that-is-long-enough | |
| run: uv run pytest -v | |
| generate-pg-pydantic-deep: | |
| name: Template - PostgreSQL + PydanticDeep | |
| needs: [lint, type-check] | |
| runs-on: ubuntu-latest | |
| services: | |
| postgres: | |
| image: postgres:16 | |
| env: | |
| POSTGRES_USER: postgres | |
| POSTGRES_PASSWORD: postgres | |
| POSTGRES_DB: test_db | |
| ports: | |
| - 5432:5432 | |
| options: >- | |
| --health-cmd pg_isready | |
| --health-interval 10s | |
| --health-timeout 5s | |
| --health-retries 5 | |
| steps: | |
| - uses: actions/checkout@v7 | |
| - name: Install uv | |
| uses: astral-sh/setup-uv@v7 | |
| with: | |
| version: "latest" | |
| - name: Set up Python | |
| uses: actions/setup-python@v6 | |
| with: | |
| python-version: "3.14" | |
| - name: Install generator | |
| run: uv sync | |
| - name: Generate project with PydanticDeep | |
| run: | | |
| mkdir -p /tmp/projects | |
| uv run fastapi-fullstack create test_pydantic_deep \ | |
| --database postgresql \ | |
| --ai-framework pydantic_deep \ | |
| -o /tmp/projects | |
| - name: Install backend | |
| working-directory: /tmp/projects/test_pydantic_deep/backend | |
| run: uv sync --dev | |
| - name: Run linting | |
| working-directory: /tmp/projects/test_pydantic_deep/backend | |
| run: | | |
| uv run ruff check . | |
| uv run ruff format --check . | |
| - name: Run type check | |
| working-directory: /tmp/projects/test_pydantic_deep/backend | |
| run: uv run ty check | |
| - name: Run tests | |
| working-directory: /tmp/projects/test_pydantic_deep/backend | |
| env: | |
| POSTGRES_HOST: localhost | |
| POSTGRES_PORT: 5432 | |
| POSTGRES_USER: postgres | |
| POSTGRES_PASSWORD: postgres | |
| POSTGRES_DB: test_db | |
| SECRET_KEY: test-secret-key-for-ci-that-is-long-enough | |
| run: uv run pytest -v | |
| generate-pg-agent-tools: | |
| name: Template - PostgreSQL + Agent Tools (web-search, charts, code-execution, skills, websockets) | |
| needs: [lint, type-check] | |
| runs-on: ubuntu-latest | |
| services: | |
| postgres: | |
| image: postgres:16 | |
| env: | |
| POSTGRES_USER: postgres | |
| POSTGRES_PASSWORD: postgres | |
| POSTGRES_DB: test_db | |
| ports: | |
| - 5432:5432 | |
| options: >- | |
| --health-cmd pg_isready | |
| --health-interval 10s | |
| --health-timeout 5s | |
| --health-retries 5 | |
| steps: | |
| - uses: actions/checkout@v7 | |
| - name: Install uv | |
| uses: astral-sh/setup-uv@v7 | |
| with: | |
| version: "latest" | |
| - name: Set up Python | |
| uses: actions/setup-python@v6 | |
| with: | |
| python-version: "3.14" | |
| - name: Install generator | |
| run: uv sync | |
| - name: Generate project with all agent tools | |
| run: | | |
| mkdir -p /tmp/projects | |
| uv run fastapi-fullstack create test_agent_tools \ | |
| --database postgresql \ | |
| --ai-framework pydantic_ai \ | |
| --web-search \ | |
| --charts \ | |
| --code-execution \ | |
| --skills \ | |
| --websockets \ | |
| --session-management \ | |
| -o /tmp/projects | |
| - name: Install backend | |
| working-directory: /tmp/projects/test_agent_tools/backend | |
| run: uv sync --dev | |
| - name: Run linting | |
| working-directory: /tmp/projects/test_agent_tools/backend | |
| run: | | |
| uv run ruff check . | |
| uv run ruff format --check . | |
| - name: Run type check | |
| working-directory: /tmp/projects/test_agent_tools/backend | |
| run: uv run ty check | |
| - name: Run tests | |
| working-directory: /tmp/projects/test_agent_tools/backend | |
| env: | |
| POSTGRES_HOST: localhost | |
| POSTGRES_PORT: 5432 | |
| POSTGRES_USER: postgres | |
| POSTGRES_PASSWORD: postgres | |
| POSTGRES_DB: test_db | |
| SECRET_KEY: test-secret-key-for-ci-that-is-long-enough | |
| run: uv run pytest -v | |
| generate-pg-channels: | |
| name: Template - PostgreSQL + Slack + Telegram | |
| needs: [lint, type-check] | |
| runs-on: ubuntu-latest | |
| services: | |
| postgres: | |
| image: postgres:16 | |
| env: | |
| POSTGRES_USER: postgres | |
| POSTGRES_PASSWORD: postgres | |
| POSTGRES_DB: test_db | |
| ports: | |
| - 5432:5432 | |
| options: >- | |
| --health-cmd pg_isready | |
| --health-interval 10s | |
| --health-timeout 5s | |
| --health-retries 5 | |
| steps: | |
| - uses: actions/checkout@v7 | |
| - name: Install uv | |
| uses: astral-sh/setup-uv@v7 | |
| with: | |
| version: "latest" | |
| - name: Set up Python | |
| uses: actions/setup-python@v6 | |
| with: | |
| python-version: "3.14" | |
| - name: Install generator | |
| run: uv sync | |
| - name: Generate project with Slack and Telegram | |
| run: | | |
| mkdir -p /tmp/projects | |
| uv run fastapi-fullstack create test_channels \ | |
| --database postgresql \ | |
| --slack \ | |
| --telegram \ | |
| -o /tmp/projects | |
| - name: Install backend | |
| working-directory: /tmp/projects/test_channels/backend | |
| run: uv sync --dev | |
| - name: Run linting | |
| working-directory: /tmp/projects/test_channels/backend | |
| run: | | |
| uv run ruff check . | |
| uv run ruff format --check . | |
| - name: Run type check | |
| working-directory: /tmp/projects/test_channels/backend | |
| run: uv run ty check | |
| - name: Run tests | |
| working-directory: /tmp/projects/test_channels/backend | |
| env: | |
| POSTGRES_HOST: localhost | |
| POSTGRES_PORT: 5432 | |
| POSTGRES_USER: postgres | |
| POSTGRES_PASSWORD: postgres | |
| POSTGRES_DB: test_db | |
| SECRET_KEY: test-secret-key-for-ci-that-is-long-enough | |
| run: uv run pytest -v | |
| generate-pg-rag-pgvector: | |
| name: Template - PostgreSQL + RAG (pgvector) | |
| needs: [lint, type-check] | |
| runs-on: ubuntu-latest | |
| services: | |
| postgres: | |
| image: postgres:16 | |
| env: | |
| POSTGRES_USER: postgres | |
| POSTGRES_PASSWORD: postgres | |
| POSTGRES_DB: test_db | |
| ports: | |
| - 5432:5432 | |
| options: >- | |
| --health-cmd pg_isready | |
| --health-interval 10s | |
| --health-timeout 5s | |
| --health-retries 5 | |
| steps: | |
| - uses: actions/checkout@v7 | |
| - name: Install uv | |
| uses: astral-sh/setup-uv@v7 | |
| with: | |
| version: "latest" | |
| - name: Set up Python | |
| uses: actions/setup-python@v6 | |
| with: | |
| python-version: "3.14" | |
| - name: Install generator | |
| run: uv sync | |
| - name: Generate project with RAG and pgvector | |
| run: | | |
| mkdir -p /tmp/projects | |
| uv run fastapi-fullstack create test_rag_pgvector \ | |
| --database postgresql \ | |
| --rag \ | |
| --vector-store pgvector \ | |
| -o /tmp/projects | |
| - name: Install backend | |
| working-directory: /tmp/projects/test_rag_pgvector/backend | |
| run: uv sync --dev | |
| - name: Run linting | |
| working-directory: /tmp/projects/test_rag_pgvector/backend | |
| run: | | |
| uv run ruff check . | |
| uv run ruff format --check . | |
| - name: Run type check | |
| working-directory: /tmp/projects/test_rag_pgvector/backend | |
| run: uv run ty check | |
| - name: Run tests | |
| working-directory: /tmp/projects/test_rag_pgvector/backend | |
| env: | |
| POSTGRES_HOST: localhost | |
| POSTGRES_PORT: 5432 | |
| POSTGRES_USER: postgres | |
| POSTGRES_PASSWORD: postgres | |
| POSTGRES_DB: test_db | |
| SECRET_KEY: test-secret-key-for-ci-that-is-long-enough | |
| run: uv run pytest -v | |
| generate-pg-rag-connectors: | |
| name: Template - PostgreSQL + RAG + Google Drive + S3 | |
| needs: [lint, type-check] | |
| runs-on: ubuntu-latest | |
| services: | |
| postgres: | |
| image: postgres:16 | |
| env: | |
| POSTGRES_USER: postgres | |
| POSTGRES_PASSWORD: postgres | |
| POSTGRES_DB: test_db | |
| ports: | |
| - 5432:5432 | |
| options: >- | |
| --health-cmd pg_isready | |
| --health-interval 10s | |
| --health-timeout 5s | |
| --health-retries 5 | |
| steps: | |
| - uses: actions/checkout@v7 | |
| - name: Install uv | |
| uses: astral-sh/setup-uv@v7 | |
| with: | |
| version: "latest" | |
| - name: Set up Python | |
| uses: actions/setup-python@v6 | |
| with: | |
| python-version: "3.14" | |
| - name: Install generator | |
| run: uv sync | |
| - name: Generate project with RAG connectors | |
| run: | | |
| mkdir -p /tmp/projects | |
| uv run fastapi-fullstack create test_rag_connectors \ | |
| --database postgresql \ | |
| --rag \ | |
| --vector-store pgvector \ | |
| --gdrive-rag \ | |
| --s3-rag \ | |
| -o /tmp/projects | |
| - name: Install backend | |
| working-directory: /tmp/projects/test_rag_connectors/backend | |
| run: uv sync --dev | |
| - name: Run linting | |
| working-directory: /tmp/projects/test_rag_connectors/backend | |
| run: | | |
| uv run ruff check . | |
| uv run ruff format --check . | |
| - name: Run type check | |
| working-directory: /tmp/projects/test_rag_connectors/backend | |
| run: uv run ty check | |
| - name: Run tests | |
| working-directory: /tmp/projects/test_rag_connectors/backend | |
| env: | |
| POSTGRES_HOST: localhost | |
| POSTGRES_PORT: 5432 | |
| POSTGRES_USER: postgres | |
| POSTGRES_PASSWORD: postgres | |
| POSTGRES_DB: test_db | |
| SECRET_KEY: test-secret-key-for-ci-that-is-long-enough | |
| run: uv run pytest -v | |
| generate-pg-email-oauth: | |
| name: Template - PostgreSQL + Email + OAuth Google | |
| needs: [lint, type-check] | |
| runs-on: ubuntu-latest | |
| services: | |
| postgres: | |
| image: postgres:16 | |
| env: | |
| POSTGRES_USER: postgres | |
| POSTGRES_PASSWORD: postgres | |
| POSTGRES_DB: test_db | |
| ports: | |
| - 5432:5432 | |
| options: >- | |
| --health-cmd pg_isready | |
| --health-interval 10s | |
| --health-timeout 5s | |
| --health-retries 5 | |
| steps: | |
| - uses: actions/checkout@v7 | |
| - name: Install uv | |
| uses: astral-sh/setup-uv@v7 | |
| with: | |
| version: "latest" | |
| - name: Set up Python | |
| uses: actions/setup-python@v6 | |
| with: | |
| python-version: "3.14" | |
| - name: Install generator | |
| run: uv sync | |
| - name: Generate project with email and OAuth | |
| run: | | |
| mkdir -p /tmp/projects | |
| uv run fastapi-fullstack create test_email_oauth \ | |
| --database postgresql \ | |
| --email-provider resend \ | |
| --oauth-google \ | |
| --frontend nextjs \ | |
| -o /tmp/projects | |
| - name: Install backend | |
| working-directory: /tmp/projects/test_email_oauth/backend | |
| run: uv sync --dev | |
| - name: Run linting | |
| working-directory: /tmp/projects/test_email_oauth/backend | |
| run: | | |
| uv run ruff check . | |
| uv run ruff format --check . | |
| - name: Run type check | |
| working-directory: /tmp/projects/test_email_oauth/backend | |
| run: uv run ty check | |
| - name: Run tests | |
| working-directory: /tmp/projects/test_email_oauth/backend | |
| env: | |
| POSTGRES_HOST: localhost | |
| POSTGRES_PORT: 5432 | |
| POSTGRES_USER: postgres | |
| POSTGRES_PASSWORD: postgres | |
| POSTGRES_DB: test_db | |
| SECRET_KEY: test-secret-key-for-ci-that-is-long-enough | |
| run: uv run pytest -v | |
| generate-pg-monitoring: | |
| name: Template - PostgreSQL + ARQ + Sentry + Prometheus + Caching | |
| needs: [lint, type-check] | |
| runs-on: ubuntu-latest | |
| services: | |
| postgres: | |
| image: postgres:16 | |
| env: | |
| POSTGRES_USER: postgres | |
| POSTGRES_PASSWORD: postgres | |
| POSTGRES_DB: test_db | |
| ports: | |
| - 5432:5432 | |
| options: >- | |
| --health-cmd pg_isready | |
| --health-interval 10s | |
| --health-timeout 5s | |
| --health-retries 5 | |
| redis: | |
| image: redis:7 | |
| ports: | |
| - 6379:6379 | |
| options: >- | |
| --health-cmd "redis-cli ping" | |
| --health-interval 10s | |
| --health-timeout 5s | |
| --health-retries 5 | |
| steps: | |
| - uses: actions/checkout@v7 | |
| - name: Install uv | |
| uses: astral-sh/setup-uv@v7 | |
| with: | |
| version: "latest" | |
| - name: Set up Python | |
| uses: actions/setup-python@v6 | |
| with: | |
| python-version: "3.14" | |
| - name: Install generator | |
| run: uv sync | |
| - name: Generate project with monitoring stack | |
| run: | | |
| mkdir -p /tmp/projects | |
| uv run fastapi-fullstack create test_monitoring \ | |
| --database postgresql \ | |
| --task-queue arq \ | |
| --redis \ | |
| --sentry \ | |
| --prometheus \ | |
| --caching \ | |
| --rate-limiting \ | |
| --file-storage \ | |
| -o /tmp/projects | |
| - name: Install backend | |
| working-directory: /tmp/projects/test_monitoring/backend | |
| run: uv sync --dev | |
| - name: Run linting | |
| working-directory: /tmp/projects/test_monitoring/backend | |
| run: | | |
| uv run ruff check . | |
| uv run ruff format --check . | |
| - name: Run type check | |
| working-directory: /tmp/projects/test_monitoring/backend | |
| run: uv run ty check | |
| - name: Run tests | |
| working-directory: /tmp/projects/test_monitoring/backend | |
| env: | |
| POSTGRES_HOST: localhost | |
| POSTGRES_PORT: 5432 | |
| POSTGRES_USER: postgres | |
| POSTGRES_PASSWORD: postgres | |
| POSTGRES_DB: test_db | |
| REDIS_HOST: localhost | |
| REDIS_PORT: 6379 | |
| SECRET_KEY: test-secret-key-for-ci-that-is-long-enough | |
| run: uv run pytest -v | |
| generate-pg-usage-chain: | |
| name: Template - PostgreSQL + Credits + Usage Dashboard + Anomaly Detection | |
| needs: [lint, type-check] | |
| runs-on: ubuntu-latest | |
| services: | |
| postgres: | |
| image: postgres:16 | |
| env: | |
| POSTGRES_USER: postgres | |
| POSTGRES_PASSWORD: postgres | |
| POSTGRES_DB: test_db | |
| ports: | |
| - 5432:5432 | |
| options: >- | |
| --health-cmd pg_isready | |
| --health-interval 10s | |
| --health-timeout 5s | |
| --health-retries 5 | |
| redis: | |
| image: redis:7 | |
| ports: | |
| - 6379:6379 | |
| options: >- | |
| --health-cmd "redis-cli ping" | |
| --health-interval 10s | |
| --health-timeout 5s | |
| --health-retries 5 | |
| steps: | |
| - uses: actions/checkout@v7 | |
| - name: Install uv | |
| uses: astral-sh/setup-uv@v7 | |
| with: | |
| version: "latest" | |
| - name: Set up Python | |
| uses: actions/setup-python@v6 | |
| with: | |
| python-version: "3.14" | |
| - name: Install generator | |
| run: uv sync | |
| - name: Generate project with full credits and monitoring chain | |
| run: | | |
| mkdir -p /tmp/projects | |
| uv run fastapi-fullstack create test_usage_chain \ | |
| --database postgresql \ | |
| --teams \ | |
| --billing \ | |
| --credits \ | |
| --usage-dashboard \ | |
| --anomaly-detection \ | |
| --slack-alerts \ | |
| --redis \ | |
| --admin-panel \ | |
| -o /tmp/projects | |
| - name: Install backend | |
| working-directory: /tmp/projects/test_usage_chain/backend | |
| run: uv sync --dev | |
| - name: Run linting | |
| working-directory: /tmp/projects/test_usage_chain/backend | |
| run: | | |
| uv run ruff check . | |
| uv run ruff format --check . | |
| - name: Run type check | |
| working-directory: /tmp/projects/test_usage_chain/backend | |
| run: uv run ty check | |
| - name: Run tests | |
| working-directory: /tmp/projects/test_usage_chain/backend | |
| env: | |
| POSTGRES_HOST: localhost | |
| POSTGRES_PORT: 5432 | |
| POSTGRES_USER: postgres | |
| POSTGRES_PASSWORD: postgres | |
| POSTGRES_DB: test_db | |
| REDIS_HOST: localhost | |
| REDIS_PORT: 6379 | |
| SECRET_KEY: test-secret-key-for-ci-that-is-long-enough | |
| run: uv run pytest -v | |
| generate-marketing: | |
| name: Template - Marketing Site + Newsletter | |
| needs: [lint, type-check] | |
| runs-on: ubuntu-latest | |
| services: | |
| postgres: | |
| image: postgres:16 | |
| env: | |
| POSTGRES_USER: postgres | |
| POSTGRES_PASSWORD: postgres | |
| POSTGRES_DB: test_db | |
| ports: | |
| - 5432:5432 | |
| options: >- | |
| --health-cmd pg_isready | |
| --health-interval 10s | |
| --health-timeout 5s | |
| --health-retries 5 | |
| steps: | |
| - uses: actions/checkout@v7 | |
| - name: Install uv | |
| uses: astral-sh/setup-uv@v7 | |
| with: | |
| version: "latest" | |
| - name: Set up Python | |
| uses: actions/setup-python@v6 | |
| with: | |
| python-version: "3.14" | |
| - name: Set up Bun | |
| uses: oven-sh/setup-bun@v2 | |
| with: | |
| bun-version: latest | |
| - name: Install generator | |
| run: uv sync | |
| - name: Generate project with marketing site and newsletter | |
| run: | | |
| mkdir -p /tmp/projects | |
| uv run fastapi-fullstack create test_marketing \ | |
| --database postgresql \ | |
| --frontend nextjs \ | |
| --marketing-site \ | |
| --email \ | |
| --email-provider resend \ | |
| --newsletter \ | |
| -o /tmp/projects | |
| - name: Install backend | |
| working-directory: /tmp/projects/test_marketing/backend | |
| run: uv sync --dev | |
| - name: Run backend linting | |
| working-directory: /tmp/projects/test_marketing/backend | |
| run: | | |
| uv run ruff check . | |
| uv run ruff format --check . | |
| - name: Run backend type check | |
| working-directory: /tmp/projects/test_marketing/backend | |
| run: uv run ty check | |
| - name: Run backend tests | |
| working-directory: /tmp/projects/test_marketing/backend | |
| env: | |
| POSTGRES_HOST: localhost | |
| POSTGRES_PORT: 5432 | |
| POSTGRES_USER: postgres | |
| POSTGRES_PASSWORD: postgres | |
| POSTGRES_DB: test_db | |
| SECRET_KEY: test-secret-key-for-ci-that-is-long-enough | |
| run: uv run pytest -v | |
| - name: Install frontend dependencies | |
| working-directory: /tmp/projects/test_marketing/frontend | |
| run: bun install | |
| - name: Run frontend lint | |
| working-directory: /tmp/projects/test_marketing/frontend | |
| run: bun run lint | |
| - name: Run frontend type check | |
| working-directory: /tmp/projects/test_marketing/frontend | |
| run: bun run type-check | |
| - name: Run frontend unit tests | |
| working-directory: /tmp/projects/test_marketing/frontend | |
| run: bun run test:run | |
| # ============================================ | |
| # Stage 3: Frontend Tests | |
| # ============================================ | |
| generate-frontend: | |
| name: Template - Frontend (Next.js) | |
| needs: [lint, type-check] | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v7 | |
| - name: Install uv | |
| uses: astral-sh/setup-uv@v7 | |
| with: | |
| version: "latest" | |
| - name: Set up Python | |
| uses: actions/setup-python@v6 | |
| with: | |
| python-version: "3.14" | |
| - name: Set up Bun | |
| uses: oven-sh/setup-bun@v2 | |
| with: | |
| bun-version: latest | |
| - name: Install generator | |
| run: uv sync | |
| - name: Generate project with frontend | |
| run: | | |
| mkdir -p /tmp/projects | |
| uv run fastapi-fullstack create test_frontend \ | |
| --frontend nextjs \ | |
| --rag \ | |
| --task-queue celery \ | |
| --redis \ | |
| -o /tmp/projects | |
| - name: Install frontend dependencies | |
| working-directory: /tmp/projects/test_frontend/frontend | |
| run: bun install | |
| - name: Run lint | |
| working-directory: /tmp/projects/test_frontend/frontend | |
| run: bun run lint | |
| - name: Run type check | |
| working-directory: /tmp/projects/test_frontend/frontend | |
| run: bun run type-check | |
| - name: Run unit tests | |
| working-directory: /tmp/projects/test_frontend/frontend | |
| run: bun run test:run | |
| generate-frontend-billing: | |
| name: Template - Frontend with Teams + Billing (Next.js) | |
| needs: [lint, type-check] | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v7 | |
| - name: Install uv | |
| uses: astral-sh/setup-uv@v7 | |
| with: | |
| version: "latest" | |
| - name: Set up Python | |
| uses: actions/setup-python@v6 | |
| with: | |
| python-version: "3.14" | |
| - name: Set up Bun | |
| uses: oven-sh/setup-bun@v2 | |
| with: | |
| bun-version: latest | |
| - name: Install generator | |
| run: uv sync | |
| - name: Generate project with billing frontend | |
| run: | | |
| mkdir -p /tmp/projects | |
| uv run fastapi-fullstack create test_frontend_billing \ | |
| --frontend nextjs \ | |
| --teams \ | |
| --billing \ | |
| --rag \ | |
| --database postgresql \ | |
| -o /tmp/projects | |
| - name: Install frontend dependencies | |
| working-directory: /tmp/projects/test_frontend_billing/frontend | |
| run: bun install | |
| - name: Run lint | |
| working-directory: /tmp/projects/test_frontend_billing/frontend | |
| run: bun run lint | |
| - name: Run type check | |
| working-directory: /tmp/projects/test_frontend_billing/frontend | |
| run: bun run type-check | |
| - name: Run unit tests | |
| working-directory: /tmp/projects/test_frontend_billing/frontend | |
| run: bun run test:run |