chore: Update CI workflow to include Prisma Client generation and improve skip logic
Some checks failed
CI / skip-ci-check (pull_request) Successful in 1m19s
CI / lint-and-type-check (pull_request) Successful in 1m42s
CI / test (pull_request) Successful in 1m46s
CI / build (pull_request) Failing after 1m46s
CI / secret-scanning (pull_request) Successful in 1m20s
CI / dependency-scan (pull_request) Successful in 1m25s
CI / sast-scan (pull_request) Successful in 2m27s
CI / workflow-summary (pull_request) Successful in 1m18s
Some checks failed
CI / skip-ci-check (pull_request) Successful in 1m19s
CI / lint-and-type-check (pull_request) Successful in 1m42s
CI / test (pull_request) Successful in 1m46s
CI / build (pull_request) Failing after 1m46s
CI / secret-scanning (pull_request) Successful in 1m20s
CI / dependency-scan (pull_request) Successful in 1m25s
CI / sast-scan (pull_request) Successful in 2m27s
CI / workflow-summary (pull_request) Successful in 1m18s
- 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
This commit is contained in:
parent
4200975c78
commit
cbf49bf306
9
.github/workflows/ci.yml
vendored
9
.github/workflows/ci.yml
vendored
@ -11,7 +11,6 @@ jobs:
|
|||||||
skip-ci-check:
|
skip-ci-check:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
outputs:
|
outputs:
|
||||||
# Default to 'false' if the step output is missing (some runners are picky)
|
|
||||||
should-skip: ${{ steps.check.outputs.skip || 'false' }}
|
should-skip: ${{ steps.check.outputs.skip || 'false' }}
|
||||||
steps:
|
steps:
|
||||||
- name: Check out code (for commit message)
|
- name: Check out code (for commit message)
|
||||||
@ -22,7 +21,6 @@ jobs:
|
|||||||
- name: Check if CI should be skipped
|
- name: Check if CI should be skipped
|
||||||
id: check
|
id: check
|
||||||
run: |
|
run: |
|
||||||
# Default to not skipping
|
|
||||||
SKIP=false
|
SKIP=false
|
||||||
|
|
||||||
# Simple skip pattern: @skipci (case-insensitive)
|
# Simple skip pattern: @skipci (case-insensitive)
|
||||||
@ -54,9 +52,7 @@ jobs:
|
|||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# Set outputs in both modern and legacy formats for wider runner compatibility
|
|
||||||
echo "skip=$SKIP" >> "$GITHUB_OUTPUT"
|
echo "skip=$SKIP" >> "$GITHUB_OUTPUT"
|
||||||
echo "::set-output name=skip::$SKIP"
|
|
||||||
echo "Branch: $BRANCH_NAME"
|
echo "Branch: $BRANCH_NAME"
|
||||||
echo "Commit: ${COMMIT_MSG:0:50}..."
|
echo "Commit: ${COMMIT_MSG:0:50}..."
|
||||||
echo "Skip CI: $SKIP"
|
echo "Skip CI: $SKIP"
|
||||||
@ -74,6 +70,11 @@ jobs:
|
|||||||
- name: Install dependencies
|
- name: Install dependencies
|
||||||
run: npm ci
|
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
|
- name: Run ESLint
|
||||||
run: npm run lint
|
run: npm run lint
|
||||||
|
|
||||||
|
|||||||
6
types/prisma.d.ts
vendored
Normal file
6
types/prisma.d.ts
vendored
Normal file
@ -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';
|
||||||
|
}
|
||||||
Loading…
x
Reference in New Issue
Block a user