Merged
Conversation
…onment with a local PostgreSQL database.
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This pull request introduces a robust local test environment setup for the API, including Dockerized database configuration, improved environment variable management, and streamlined bootstrapping scripts. It also updates the Playwright configuration to support these changes and adds a basic API health check test.
Test Environment Setup and Automation
scripts/test-bootstrap.jsto automate the setup of development and test environments, including database container management and schema migrations. The script uses different Docker Compose files and environment files depending on the mode (devortest).docker-compose.test.yamlto define a disposable PostgreSQL service for running tests locally, ensuring isolation and repeatability..env.testfile for the API to separate test environment variables from development variables.Playwright and Testing Configuration
playwright.config.tsto load environment variables from.env.test, use the correctCLIENT_URLfor the test base URL, and automatically start the local dev server before running tests. [1] [2] [3]tests/api/health.spec.ts) to verify the API health endpoint.Package and Dependency Management
dotenv-clitodevDependenciesfor loading environment variables in scripts.setup:devandsetup:testto simplify local environment setup using the new bootstrap script.Fixes: #81