-
-
Notifications
You must be signed in to change notification settings - Fork 235
chore(test): swap to SQLite for local E2E — schema, .env, and docker cleanup #863
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: develop
Are you sure you want to change the base?
Conversation
PR Reviewer Guide 🔍Here are some key observations to aid the review process:
|
PR Code Suggestions ✨Explore these optional code suggestions:
|
…or SQLite compatibility
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
not sure about what this does
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
we would need to tie up sqlite with e2e tests. they are already present and can be run using pnpm e2e:api
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
i dont think we should be maintaining a test schema file
@Kolbe23, please resolve all open reviews! |
@Kolbe23, please resolve all open reviews; otherwise this PR will be closed after Thu Apr 24 2025 16:47:46 GMT+0000 (Coordinated Universal Time)! |
User description
…al E2E testing
Description
Give a summary of the change that you have made
This PR introduces a SQLite-compatible Prisma schema (
schema.test.prisma
) and corresponding environment config (.env.test
) to enable local E2E testing without PostgreSQL. Additionally, it removes the unused PostgreSQL service fromdocker-compose-test.yml
in alignment with issue #333.This allows contributors to work with a lightweight, in-memory-compatible database setup without requiring PostgreSQL.
Fixes #333
Dependencies
@prisma/client (existing dependency)
env-cmd (used for loading test-specific env vars)
SQLite (as defined in the Prisma datasource)
Future Improvements
Mention any improvements to be done in future related to any file/feature
Add GitHub Actions workflow to run tests with SQLite on CI
Allow toggling between PostgreSQL and SQLite via env vars for broader test coverage
Mentions
Mention and tag the people
@keyshade/maintainers (for review)
Screenshots of relevant screens
Add screenshots of relevant screens
Developer's checklist
If changes are made in the code:
Documentation Update
PR Type
Enhancement, Configuration changes
Description
Added SQLite-compatible Prisma schema for testing.
Introduced
.env.test
for SQLite database configuration.Replaced Postgres with SQLite for local E2E testing.
Improved testing setup with lightweight database support.
Changes walkthrough 📝
.env.test
Introduced `.env.test` for SQLite database configuration
.env.test
DATABASE_URL
to use SQLite.schema.test.prisma
Added SQLite-compatible Prisma schema for testing
apps/api/src/prisma/schema.test.prisma
User
,Workspace
, andProject
.