From 7e949a15ca19b04c7ab44d1b629f3b4b91bb8c63 Mon Sep 17 00:00:00 2001 From: vyshnav Date: Fri, 11 Oct 2024 15:46:09 +0530 Subject: [PATCH] update actions --- .github/workflows/test.yml | 21 +++++++++++++++++---- 1 file changed, 17 insertions(+), 4 deletions(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 3b459e2..340f903 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -26,7 +26,21 @@ jobs: node-version: ${{ matrix.node-version }} - name: Install dependencies - run: npm install + run: | + npm ci + + # Ensure SQLite database is properly set up + - name: Run Prisma Migrations + run: | + npx prisma migrate deploy + env: + DATABASE_URL: "file:./dev.db" # Use SQLite file-based DB during CI + + - name: Generate Prisma Client + run: | + npx prisma generate + env: + DATABASE_URL: "file:./dev.db" # Same SQLite DB for Prisma client - name: Check Environment Variables run: | @@ -36,8 +50,7 @@ jobs: echo "GOOGLE_SECRET is set: ${{ env.GOOGLE_SECRET != '' }}" echo "TURSO_AUTH_TOKEN is set: ${{ env.TURSO_AUTH_TOKEN != '' }}" echo "TURSO_DATABASE_URL is set: ${{ env.TURSO_DATABASE_URL != '' }}" - echo "RESEND_API_KEY" is set ${{ env.RESEND_API_KEY != '' }} - echo + echo "RESEND_API_KEY is set: ${{ env.RESEND_API_KEY != '' }}" env: NEXT_PUBLIC_SITE_URL: ${{ secrets.NEXT_PUBLIC_SITE_URL }} NEXTAUTH_SECRET: ${{ secrets.NEXTAUTH_SECRET }} @@ -66,4 +79,4 @@ jobs: uses: actions/upload-artifact@v3 with: name: build - path: build # Adjust this if your build output is in a different directory \ No newline at end of file + path: build # Adjust this if your build output is in a different directory