Separate ci env from test env
Test / test (push) Successful in 1m3s Details

This commit is contained in:
Jeff 2024-10-19 17:42:24 -04:00
parent 277ee9f2b5
commit be55d46391
4 changed files with 10 additions and 3 deletions

6
.env.ci Normal file
View File

@ -0,0 +1,6 @@
DATABASE="postgres"
POSTGRES_PASSWORD="testpassword"
POSTGRES_HOST="database"
POSTGRES_PORT=5432
VAPID_PRIVATE_KEY="privatekey"
BASE_URL="http://localhost:5173"

View File

@ -1,5 +1,6 @@
DATABASE="postgres"
POSTGRES_PASSWORD="testpassword"
POSTGRES_HOST="database"
POSTGRES_HOST="localhost"
POSTGRES_PORT=5434
VAPID_PRIVATE_KEY="privatekey"
BASE_URL="http://localhost:5173"

View File

@ -3,5 +3,5 @@ export default {
host: process.env.POSTGRES_HOST ?? "database",
user: "postgres",
password: process.env.POSTGRES_PASSWORD,
port: 5432,
port: process.env.POSTGRES_PORT ?? 5432,
}

View File

@ -11,7 +11,7 @@
"typecheck": "tsc",
"watch": "export $(cat .env.test | xargs) && docker compose -f docker-compose-test.yaml up database -d --remove-orphans && jest --watch --config=jest.config.ts",
"test": "export $(cat .env.test | xargs) && docker compose -f docker-compose-test.yaml up database -d --remove-orphans && sleep 5 && jest --config=jest.config.ts",
"ci": "export $(cat .env.test | xargs) && jest --config=jest.config.ts"
"ci": "export $(cat .env.ci | xargs) && jest --config=jest.config.ts"
},
"dependencies": {
"@remix-pwa/sw": "^3.0.9",