This commit is contained in:
@@ -37,6 +37,9 @@ jobs:
|
|||||||
SMTP_URL=smtp://localhost:1025
|
SMTP_URL=smtp://localhost:1025
|
||||||
SMTP_FROM=no-reply@example.test
|
SMTP_FROM=no-reply@example.test
|
||||||
MFA_ENCRYPTION_KEY=AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA=
|
MFA_ENCRYPTION_KEY=AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA=
|
||||||
|
INITIAL_ADMIN_EMAIL=ci-admin@example.test
|
||||||
|
INITIAL_ADMIN_PASSWORD=CiPassword123!
|
||||||
|
INITIAL_SELLER_NAME=CI Catalog Owner
|
||||||
EOF
|
EOF
|
||||||
npm run db:up
|
npm run db:up
|
||||||
docker compose exec -T postgres createdb -U pokemon_inventory pokemon_inventory_test || true
|
docker compose exec -T postgres createdb -U pokemon_inventory pokemon_inventory_test || true
|
||||||
@@ -48,6 +51,22 @@ jobs:
|
|||||||
TEST_DATABASE_URL: postgresql://pokemon_inventory:ci-password@localhost:5433/pokemon_inventory_test
|
TEST_DATABASE_URL: postgresql://pokemon_inventory:ci-password@localhost:5433/pokemon_inventory_test
|
||||||
TEST_REDIS_URL: redis://localhost:6380
|
TEST_REDIS_URL: redis://localhost:6380
|
||||||
run: npm run test:integration
|
run: npm run test:integration
|
||||||
|
- name: Start application for E2E tests
|
||||||
|
run: |
|
||||||
|
nohup npm run dev > /tmp/pokemon-inventory-dev.log 2>&1 &
|
||||||
|
echo $! > /tmp/pokemon-inventory-dev.pid
|
||||||
|
npx wait-on http://localhost:3000/health http://localhost:5173/
|
||||||
|
npm run provision:admin
|
||||||
|
- name: Run authenticated E2E tests
|
||||||
|
env:
|
||||||
|
INITIAL_ADMIN_EMAIL: ci-admin@example.test
|
||||||
|
INITIAL_ADMIN_PASSWORD: CiPassword123!
|
||||||
|
run: npm run test:e2e
|
||||||
|
- name: Stop application and services
|
||||||
|
if: always()
|
||||||
|
run: |
|
||||||
|
if [ -f /tmp/pokemon-inventory-dev.pid ]; then kill "$(cat /tmp/pokemon-inventory-dev.pid)" || true; fi
|
||||||
|
docker compose down -v
|
||||||
- run: npm run test --workspace=@pokemon-inventory/web
|
- run: npm run test --workspace=@pokemon-inventory/web
|
||||||
- run: npm run build --workspace=@pokemon-inventory/web
|
- run: npm run build --workspace=@pokemon-inventory/web
|
||||||
- run: npm run build-storybook --workspace=@pokemon-inventory/web
|
- run: npm run build-storybook --workspace=@pokemon-inventory/web
|
||||||
|
|||||||
Reference in New Issue
Block a user