Skip to content
This repository was archived by the owner on Feb 11, 2026. It is now read-only.

implement cicd - #18

Merged
danielvanginneken merged 11 commits into
mainfrom
cicd
Dec 16, 2025
Merged

danielvanginneken merged 11 commits into
mainfrom
cicd

Conversation

@danielvanginneken

Copy link
Copy Markdown
Contributor

This pull request updates how the DATABASE_URL environment variable is handled for Prisma in both the GitHub Actions workflow and the Prisma configuration. The main goal is to ensure that a default database URL is available if the environment variable is not set, improving reliability in different environments.

Prisma configuration improvements:

  • Updated prisma.config.ts to use process.env.DATABASE_URL directly, with a fallback to a default PostgreSQL connection string if the environment variable is not set. This removes reliance on the custom env helper and ensures Prisma always has a valid database URL. [1] [2]

CI/CD workflow adjustments:

  • In the .github/workflows/cicd.yml file, explicitly sets the DATABASE_URL environment variable for the "Prisma Generate" step in both jobs, using a hardcoded value for local runs and a secret for production/deployment runs. This ensures Prisma commands have the necessary configuration during CI/CD. [1] [2]…BASE_URL and add env variable in CI/CD workflow

…BASE_URL and add env variable in CI/CD workflow

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This pull request modifies the handling of the DATABASE_URL environment variable for Prisma configuration. While the PR title suggests implementing new CI/CD infrastructure, the changes actually enhance existing CI/CD workflows by adding explicit DATABASE_URL environment variable configuration. The modifications aim to ensure Prisma commands have valid database URLs during both CI/CD execution and local development by introducing fallback values.

Key changes include:

  • Replacing the env() helper with direct process.env.DATABASE_URL access and a fallback connection string in prisma.config.ts
  • Adding explicit DATABASE_URL environment variables to Prisma Generate steps in the CI/CD workflow

Reviewed changes

Copilot reviewed 3 out of 3 changed files in this pull request and generated 7 comments.

File Description
prisma.config.ts Removes the env helper dependency and adds a fallback PostgreSQL connection string for DATABASE_URL
.github/workflows/cicd.yml Explicitly sets DATABASE_URL environment variable for Prisma Generate steps in both build_test and prisma_migrate jobs

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread prisma.config.ts Outdated
Comment thread .github/workflows/cicd.yml Outdated
Comment thread .github/workflows/cicd.yml Outdated
Comment thread prisma.config.ts Outdated
Comment thread .github/workflows/cicd.yml Outdated
Comment thread prisma.config.ts Outdated
Comment thread prisma.config.ts Outdated
- Add DATABASE_URL env var to Prisma generate steps in workflow
- Update prisma.config.ts to use process.env with fallback
- Add test:ci script to package.json
- Fix Jest configuration to support @/* path aliases
- Update tests to properly mock dependencies
- Remove obsolete app.controller.spec.ts test
@danielvanginneken
danielvanginneken merged commit 51ff81d into main Dec 16, 2025
4 checks passed
@danielvanginneken
danielvanginneken deleted the cicd branch December 16, 2025 13:50
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

2 participants