Merge pull request #75 from Daniel-1600/feature/cascade-delete-catego… #166
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: | |
| types: [opened, synchronize] | |
| jobs: | |
| build-and-test: | |
| name: Build & Test | |
| runs-on: ubuntu-latest | |
| permissions: | |
| contents: read | |
| steps: | |
| - name: Checkout Repo | |
| uses: actions/checkout@v4 | |
| with: | |
| fetch-depth: 2 | |
| # 1️⃣ Upgrade to Node 22 (Required for MCP) | |
| - name: Setup Node.js 22 | |
| uses: actions/setup-node@v4 | |
| with: | |
| node-version: 22 | |
| cache: "npm" | |
| # 2️⃣ Install Dependencies (With Dummy Env) | |
| - name: Install Dependencies | |
| run: npm ci | |
| env: | |
| DATABASE_URL: "postgresql://dummy:password@localhost:5432/mydb" | |
| BETTER_AUTH_SECRET: "dummy_secret_for_install" | |
| # 3️⃣ Generate Prisma Client (Direct Command) | |
| # ⚠️ FIX: We run prisma directly here instead of via Turbo | |
| - name: Generate Prisma Client | |
| run: npx prisma generate --schema=apps/api/prisma/schema.prisma | |
| env: | |
| DATABASE_URL: "postgresql://dummy:password@localhost:5432/mydb" | |
| # 4️⃣ Run Turbo Pipeline (Build & Lint only) | |
| - name: Run Turbo Pipeline | |
| # ⚠️ FIX: Pass DATABASE_URL directly in the command line | |
| run: DATABASE_URL="postgresql://dummy:password@localhost:5432/mydb" npx turbo run build lint | |
| env: | |
| BETTER_AUTH_SECRET: "dummy_secret_for_build" | |
| BETTER_AUTH_URL: "http://localhost:3000" | |
| CLIENT_URL: "http://localhost:5173" | |
| VITE_API_URL: "http://localhost:3000" |