From cbf49bf306f43fc0f04b99dcee0a94753b12d843 Mon Sep 17 00:00:00 2001 From: ilia Date: Fri, 2 Jan 2026 17:27:32 -0500 Subject: [PATCH] chore: Update CI workflow to include Prisma Client generation and improve skip logic - Add step to generate Prisma Client with DATABASE_URL for consistent type generation - Clean up skip logic by removing unnecessary comments and legacy output formats - Ensure CI skip checks are clear and maintain compatibility across runners --- .github/workflows/ci.yml | 9 +++++---- types/prisma.d.ts | 6 ++++++ 2 files changed, 11 insertions(+), 4 deletions(-) create mode 100644 types/prisma.d.ts diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index ee7de1c..8db5b0a 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -11,7 +11,6 @@ jobs: skip-ci-check: runs-on: ubuntu-latest outputs: - # Default to 'false' if the step output is missing (some runners are picky) should-skip: ${{ steps.check.outputs.skip || 'false' }} steps: - name: Check out code (for commit message) @@ -22,7 +21,6 @@ jobs: - name: Check if CI should be skipped id: check run: | - # Default to not skipping SKIP=false # Simple skip pattern: @skipci (case-insensitive) @@ -54,9 +52,7 @@ jobs: fi fi - # Set outputs in both modern and legacy formats for wider runner compatibility echo "skip=$SKIP" >> "$GITHUB_OUTPUT" - echo "::set-output name=skip::$SKIP" echo "Branch: $BRANCH_NAME" echo "Commit: ${COMMIT_MSG:0:50}..." echo "Skip CI: $SKIP" @@ -74,6 +70,11 @@ jobs: - name: Install dependencies run: npm ci + - name: Generate Prisma Client + run: npm run db:generate + env: + DATABASE_URL: postgresql://postgres:postgres@localhost:5432/mirrormatch?schema=public + - name: Run ESLint run: npm run lint diff --git a/types/prisma.d.ts b/types/prisma.d.ts new file mode 100644 index 0000000..ef50706 --- /dev/null +++ b/types/prisma.d.ts @@ -0,0 +1,6 @@ +// Fallback typings for CI environments where Prisma's generated +// module resolution can be finicky under `moduleResolution: bundler`. +declare module '@prisma/client' { + export * from '@prisma/client/.prisma/client'; + export { PrismaClient } from '@prisma/client/.prisma/client'; +}