fix: preserve DATABASE_URL from environment in e2e scripts
Pull Request / unit-tests (pull_request) Failing after 44s
Pull Request / e2e-tests (pull_request) Has been skipped
Pull Request / analyze-bump-type (pull_request) Has been skipped

This commit is contained in:
2026-05-10 21:25:45 -07:00
parent f6f06aef33
commit f8a3649dfb
+4 -4
View File
@@ -15,10 +15,10 @@
"test:unit:sequential": "bun test src/__tests__/unit/ --max-concurrency=1",
"test:acceptance": "bun x playwright test e2e/",
"test:acceptance:headed": "bun x playwright test e2e/ --headed",
"test:acceptance:cucumber": "DATABASE_URL=$(grep DATABASE_URL .env.development | cut -d'=' -f2 | tr -d '\"') DATABASE_PROVIDER=postgresql bun cucumber-js --config e2e/cucumber/cucumber.config.ts",
"test:acceptance:cucumber:pretty": "DATABASE_URL=$(grep DATABASE_URL .env.development | cut -d'=' -f2 | tr -d '\"') DATABASE_PROVIDER=postgresql bun cucumber-js --config e2e/cucumber/cucumber.config.ts --format pretty:cucumber-pretty",
"test:acceptance:cucumber:prod": "bun run build && (trap 'kill $(jobs -p) 2>/dev/null || true' EXIT; DATABASE_URL=${DATABASE_URL:-$(grep DATABASE_URL .env.development | cut -d'=' -f2 | tr -d '\"')} DATABASE_PROVIDER=${DATABASE_PROVIDER:-postgresql} bun run start & echo 'Waiting for server to start...'; for i in {1..30}; do if curl -s http://localhost:3000 > /dev/null 2>&1; then echo 'Server ready!'; break; fi; sleep 1; done; bun run test:acceptance:cucumber)",
"cucumber": "DATABASE_URL=$(grep DATABASE_URL .env.development | cut -d'=' -f2 | tr -d '\"') DATABASE_PROVIDER=postgresql bun cucumber-js --config e2e/cucumber/cucumber.config.ts",
"test:acceptance:cucumber": "DATABASE_URL=\"${DATABASE_URL:-$(grep DATABASE_URL .env.development | cut -d'=' -f2 | tr -d '\"')}\" DATABASE_PROVIDER=postgresql bun cucumber-js --config e2e/cucumber/cucumber.config.ts",
"test:acceptance:cucumber:pretty": "DATABASE_URL=\"${DATABASE_URL:-$(grep DATABASE_URL .env.development | cut -d'=' -f2 | tr -d '\"')}\" DATABASE_PROVIDER=postgresql bun cucumber-js --config e2e/cucumber/cucumber.config.ts --format pretty:cucumber-pretty",
"test:acceptance:cucumber:prod": "bun run build && (trap 'kill $(jobs -p) 2>/dev/null || true' EXIT; export DATABASE_URL=\"${DATABASE_URL:-$(grep DATABASE_URL .env.development | cut -d'=' -f2 | tr -d '\"')}\" DATABASE_PROVIDER=\"${DATABASE_PROVIDER:-postgresql}\" bun run start & echo 'Waiting for server to start...'; for i in {1..30}; do if curl -s http://localhost:3000 > /dev/null 2>&1; then echo 'Server ready!'; break; fi; sleep 1; done; bun run test:acceptance:cucumber)",
"cucumber": "DATABASE_URL=\"${DATABASE_URL:-$(grep DATABASE_URL .env.development | cut -d'=' -f2 | tr -d '\"')}\" DATABASE_PROVIDER=postgresql bun cucumber-js --config e2e/cucumber/cucumber.config.ts",
"db:setup-dev": "bun run scripts/setup-postgres.js",
"db:setup-dev:clean": "bun run scripts/setup-postgres.js --drop",
"db:cleanup-prod": "bun run scripts/cleanup-prod-db.js",