feature: add support for recipe sharing via individual links and kitchens #98
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, master] | |
| pull_request: | |
| branches: [main, master] | |
| jobs: | |
| # Detect which paths changed | |
| changes: | |
| name: Detect changes | |
| runs-on: ubuntu-latest | |
| outputs: | |
| library: ${{ steps.filter.outputs.library }} | |
| app: ${{ steps.filter.outputs.app }} | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - uses: dorny/paths-filter@v3 | |
| id: filter | |
| with: | |
| filters: | | |
| library: | |
| - 'packages/recipe_clipper/**' | |
| - 'pyproject.toml' | |
| - 'uv.lock' | |
| app: | |
| - 'apps/kitchen_mate/**' | |
| - 'pyproject.toml' | |
| - 'uv.lock' | |
| # Library CI - runs when library code changes | |
| library-lint: | |
| name: Library - Lint | |
| runs-on: ubuntu-latest | |
| needs: changes | |
| if: needs.changes.outputs.library == 'true' | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Install uv | |
| uses: astral-sh/setup-uv@v4 | |
| with: | |
| enable-cache: true | |
| - name: Set up Python | |
| uses: actions/setup-python@v5 | |
| with: | |
| python-version: "3.14" | |
| - name: Install dependencies | |
| run: | | |
| uv sync --directory packages/recipe_clipper --extra dev | |
| - name: Run ruff format check | |
| run: | | |
| uv run --directory packages/recipe_clipper ruff format --check src/ tests/ | |
| - name: Run ruff lint | |
| run: | | |
| uv run --directory packages/recipe_clipper ruff check src/ tests/ | |
| library-test: | |
| name: Library - Test | |
| runs-on: ubuntu-latest | |
| needs: [changes, library-lint] | |
| if: needs.changes.outputs.library == 'true' | |
| strategy: | |
| matrix: | |
| python-version: ["3.10", "3.11", "3.12", "3.13", "3.14"] | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Install uv | |
| uses: astral-sh/setup-uv@v4 | |
| with: | |
| enable-cache: true | |
| - name: Set up Python ${{ matrix.python-version }} | |
| uses: actions/setup-python@v5 | |
| with: | |
| python-version: ${{ matrix.python-version }} | |
| - name: Install dependencies | |
| run: | | |
| uv sync --directory packages/recipe_clipper --extra dev | |
| - name: Run tests | |
| run: | | |
| uv run --directory packages/recipe_clipper pytest -v --cov=recipe_clipper --cov-report=xml | |
| - name: Upload coverage to Codecov | |
| if: matrix.python-version == '3.14' | |
| uses: codecov/codecov-action@v4 | |
| with: | |
| files: ./packages/recipe_clipper/coverage.xml | |
| flags: library | |
| name: library-coverage | |
| # App CI - runs when app code changes | |
| app-lint: | |
| name: App - Lint | |
| runs-on: ubuntu-latest | |
| needs: changes | |
| if: needs.changes.outputs.app == 'true' | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Install uv | |
| uses: astral-sh/setup-uv@v4 | |
| with: | |
| enable-cache: true | |
| - name: Set up Python | |
| uses: actions/setup-python@v5 | |
| with: | |
| python-version: "3.14" | |
| - name: Install dependencies | |
| run: | | |
| uv sync --directory apps/kitchen_mate --extra dev | |
| - name: Run ruff format check | |
| run: | | |
| uv run --directory apps/kitchen_mate ruff format --check src/ tests/ | |
| - name: Run ruff lint | |
| run: | | |
| uv run --directory apps/kitchen_mate ruff check src/ tests/ | |
| app-test: | |
| name: App - Test | |
| runs-on: ubuntu-latest | |
| needs: [changes, app-lint] | |
| if: needs.changes.outputs.app == 'true' | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Install uv | |
| uses: astral-sh/setup-uv@v4 | |
| with: | |
| enable-cache: true | |
| - name: Set up Python | |
| uses: actions/setup-python@v5 | |
| with: | |
| python-version: "3.14" | |
| - name: Install dependencies | |
| run: | | |
| uv sync --directory apps/kitchen_mate --extra dev | |
| - name: Run tests | |
| run: | | |
| uv run --directory apps/kitchen_mate pytest -v | |
| # Frontend CI - runs when app code changes | |
| frontend: | |
| name: Frontend - Lint & Build | |
| runs-on: ubuntu-latest | |
| needs: changes | |
| if: needs.changes.outputs.app == 'true' | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Set up Node.js | |
| uses: actions/setup-node@v4 | |
| with: | |
| node-version: "24" | |
| cache: "npm" | |
| cache-dependency-path: apps/kitchen_mate/frontend/package-lock.json | |
| - name: Install dependencies | |
| run: npm ci | |
| working-directory: apps/kitchen_mate/frontend | |
| - name: Run ESLint | |
| run: npm run lint | |
| working-directory: apps/kitchen_mate/frontend | |
| - name: Build frontend | |
| run: npm run build | |
| working-directory: apps/kitchen_mate/frontend | |
| # Workspace-wide checks - always run | |
| workspace-lint: | |
| name: Workspace - Lint | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Install uv | |
| uses: astral-sh/setup-uv@v4 | |
| with: | |
| enable-cache: true | |
| - name: Set up Python | |
| uses: actions/setup-python@v5 | |
| with: | |
| python-version: "3.14" | |
| - name: Install dependencies | |
| run: | | |
| uv sync --all-extras | |
| - name: Check workspace configuration | |
| run: | | |
| uv lock --check | |
| # Deploy to Render - only on main branch after CI passes | |
| deploy: | |
| name: Deploy to Render | |
| runs-on: ubuntu-latest | |
| needs: [changes, app-test, frontend] | |
| # Only deploy on push to main, not PRs, and only if app changed | |
| if: github.event_name == 'push' && github.ref == 'refs/heads/main' && needs.changes.outputs.app == 'true' | |
| steps: | |
| - name: Trigger Render Deploy Hook | |
| env: | |
| RENDER_DEPLOY_HOOK_URL: ${{ secrets.RENDER_DEPLOY_HOOK_URL }} | |
| run: | | |
| if [ -z "$RENDER_DEPLOY_HOOK_URL" ]; then | |
| echo "RENDER_DEPLOY_HOOK_URL secret not set, skipping deployment" | |
| exit 0 | |
| fi | |
| curl -X POST "$RENDER_DEPLOY_HOOK_URL" |