Run full test suite in GitHub Actions with disposable test env#6
Run full test suite in GitHub Actions with disposable test env#6devarshishimpi wants to merge 1 commit into
Conversation
There was a problem hiding this comment.
Codra Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 42186fb1a6
ℹ️ About Codra in GitHub
Your team has set up Codra to review pull requests in this repo. Reviews are triggered when you:
- Open a pull request for review
- Mark a draft as ready
- Comment "@codra-app review"
If Codra has suggestions, it will comment; otherwise it will react with 👍.
Codra can also answer questions or update the PR. Try commenting "@codra-app address that feedback".
There was a problem hiding this comment.
Codra Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 42186fb1a6
ℹ️ About Codra in GitHub
Your team has set up Codra to review pull requests in this repo. Reviews are triggered when you:
- Open a pull request for review
- Mark a draft as ready
- Comment "@codra-app review"
If Codra has suggestions, it will comment; otherwise it will react with 👍.
Codra can also answer questions or update the PR. Try commenting "@codra-app address that feedback".
| # Comma-separated list of GitHub usernames allowed to access the dashboard | ||
| DASHBOARD_ALLOWED_USERS="username1,username2" | ||
| # --- Integration tests --- | ||
| TEST_DATABASE_URL="postgresql://user:password@localhost:5432/codra" |
There was a problem hiding this comment.
Removal of critical warning and unsafe example for TEST_DATABASE_URL
The previous version of .dev.vars.example included a critical warning (line 38) stating that TEST_DATABASE_URL MUST be a separate database to avoid data loss during test sweeps. The updated version removes this warning and changes the example database name from 'codra_test' to 'codra'. This increases the risk of developers accidentally running integration tests against their development or production database, potentially leading to catastrophic data loss.
| TEST_DATABASE_URL="postgresql://user:password@localhost:5432/codra" | |
| # --- Integration tests --- | |
| # MUST be a separate database to avoid data loss during test sweeps. | |
| TEST_DATABASE_URL="postgresql://user:password@localhost:5432/codra_test" |
| # Create or identify the DLQ queue, then set CF_DLQ_ID to that queue's ID. | ||
| # Generate token at https://dash.cloudflare.com/profile/api-tokens (Queues:Edit permission) | ||
| CF_API_TOKEN="REPLACE_WITH_CLOUDFLARE_API_TOKEN" | ||
| # --- Cloudflare API --- |
There was a problem hiding this comment.
Removal of required CF_DLQ_ID variable
The variable CF_DLQ_ID, which was explicitly marked as '(Required)' in the previous version for Cloudflare DLQ inspection and management, has been removed from the example file. If the application still depends on this variable for DLQ functionality, new developers will be missing a critical configuration key, leading to runtime errors or broken functionality in the /api/dlq endpoints.
| # --- Cloudflare API --- | |
| CF_ACCOUNT_ID="REPLACE_WITH_YOUR_CLOUDFLARE_ACCOUNT_ID" | |
| CF_API_TOKEN="REPLACE_WITH_CLOUDFLARE_API_TOKEN" | |
| CF_DLQ_ID="REPLACE_WITH_YOUR_DLQ_QUEUE_ID" |
| CF_API_TOKEN="REPLACE_WITH_CLOUDFLARE_API_TOKEN" | ||
|
|
||
| # --- Application Settings --- | ||
| # --- Application URLs and mode --- |
There was a problem hiding this comment.
Removal of BOT_USERNAME configuration
The BOT_USERNAME variable has been removed from the example file. If the application logic still references this variable for bot identification or configuration, it will be missing from the environment of new developers who rely on this example file for setup.
| # --- Application URLs and mode --- | |
| APP_URL="http://localhost:8787" | |
| BOT_USERNAME="codra-app-dev" | |
| AUTH_CALLBACK_URL="http://localhost:8787/auth/github/callback" |
| GITHUB_CLIENT_ID="fake-dashboard-client-id" | ||
| GITHUB_CLIENT_SECRET="fake-dashboard-client-secret" | ||
| AUTH_CALLBACK_URL="https://codra.test/auth/github/callback" | ||
| DASHBOARD_ALLOWED_USERS="devarshishimpi" |
There was a problem hiding this comment.
Hardcoded specific username in example file
The variable DASHBOARD_ALLOWED_USERS contains a specific username ('devarshishimpi'). Example environment files should generally use generic placeholders (e.g., 'your-github-username') to avoid coupling the project template to a specific individual's identity.
| DASHBOARD_ALLOWED_USERS="devarshishimpi" | |
| DASHBOARD_ALLOWED_USERS="your-github-username" |
There was a problem hiding this comment.
Codra Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 42186fb1a6
ℹ️ About Codra in GitHub
Your team has set up Codra to review pull requests in this repo. Reviews are triggered when you:
- Open a pull request for review
- Mark a draft as ready
- Comment "@codra-app review"
If Codra has suggestions, it will comment; otherwise it will react with 👍.
Codra can also answer questions or update the PR. Try commenting "@codra-app address that feedback".
| # Comma-separated list of GitHub usernames allowed to access the dashboard | ||
| DASHBOARD_ALLOWED_USERS="username1,username2" | ||
| # --- Integration tests --- | ||
| TEST_DATABASE_URL="postgresql://user:password@localhost:5432/codra" |
There was a problem hiding this comment.
Removal of critical warning and unsafe example for TEST_DATABASE_URL
The previous version of .dev.vars.example included a critical warning (line 38) stating that TEST_DATABASE_URL MUST be a separate database to avoid data loss during test sweeps. The updated version removes this warning and changes the example database name from 'codra_test' to 'codra'. This increases the risk of developers accidentally running integration tests against their development or production database, potentially leading to catastrophic data loss.
| TEST_DATABASE_URL="postgresql://user:password@localhost:5432/codra" | |
| # --- Integration tests --- | |
| # MUST be a separate database to avoid data loss during test sweeps. | |
| TEST_DATABASE_URL="postgresql://user:password@localhost:5432/codra_test" |
| # Create or identify the DLQ queue, then set CF_DLQ_ID to that queue's ID. | ||
| # Generate token at https://dash.cloudflare.com/profile/api-tokens (Queues:Edit permission) | ||
| CF_API_TOKEN="REPLACE_WITH_CLOUDFLARE_API_TOKEN" | ||
| # --- Cloudflare API --- |
There was a problem hiding this comment.
Removal of required CF_DLQ_ID variable
The variable CF_DLQ_ID, which was explicitly marked as '(Required)' in the previous version for Cloudflare DLQ inspection and management, has been removed from the example file. If the application still depends on this variable for DLQ functionality, new developers will be missing a critical configuration key, leading to runtime errors or broken functionality in the /api/dlq endpoints.
| # --- Cloudflare API --- | |
| CF_ACCOUNT_ID="REPLACE_WITH_YOUR_CLOUDFLARE_ACCOUNT_ID" | |
| CF_API_TOKEN="REPLACE_WITH_CLOUDFLARE_API_TOKEN" | |
| CF_DLQ_ID="REPLACE_WITH_YOUR_DLQ_QUEUE_ID" |
| CF_API_TOKEN="REPLACE_WITH_CLOUDFLARE_API_TOKEN" | ||
|
|
||
| # --- Application Settings --- | ||
| # --- Application URLs and mode --- |
There was a problem hiding this comment.
Removal of BOT_USERNAME configuration
The BOT_USERNAME variable has been removed from the example file. If the application logic still references this variable for bot identification or configuration, it will be missing from the environment of new developers who rely on this example file for setup.
| # --- Application URLs and mode --- | |
| APP_URL="http://localhost:8787" | |
| BOT_USERNAME="codra-app-dev" | |
| AUTH_CALLBACK_URL="http://localhost:8787/auth/github/callback" |
| GITHUB_CLIENT_ID="fake-dashboard-client-id" | ||
| GITHUB_CLIENT_SECRET="fake-dashboard-client-secret" | ||
| AUTH_CALLBACK_URL="https://codra.test/auth/github/callback" | ||
| DASHBOARD_ALLOWED_USERS="devarshishimpi" |
There was a problem hiding this comment.
Hardcoded specific username in example file
The variable DASHBOARD_ALLOWED_USERS contains a specific username ('devarshishimpi'). Example environment files should generally use generic placeholders (e.g., 'your-github-username') to avoid coupling the project template to a specific individual's identity.
| DASHBOARD_ALLOWED_USERS="devarshishimpi" | |
| DASHBOARD_ALLOWED_USERS="your-github-username" |
Description
Sets up CI to run the full Codra test suite on PRs, pushes to main, and manual workflow dispatches.
Changes include:
.env.test.examplefor local test setup..dev.vars.exampleto match the local.dev.varsenv names.Closes #1
Type of change
How Has This Been Tested?
Checklist: