This commit is contained in:
@@ -15,8 +15,39 @@ jobs:
|
|||||||
node-version: 22
|
node-version: 22
|
||||||
cache: npm
|
cache: npm
|
||||||
- run: npm ci
|
- run: npm ci
|
||||||
|
- name: Start integration services
|
||||||
|
env:
|
||||||
|
POSTGRES_PASSWORD: ci-password
|
||||||
|
POSTGRES_DB: pokemon_inventory
|
||||||
|
POSTGRES_USER: pokemon_inventory
|
||||||
|
POSTGRES_PORT: 5433
|
||||||
|
REDIS_PORT: 6380
|
||||||
|
run: |
|
||||||
|
cat > .env <<'EOF'
|
||||||
|
API_PORT=3000
|
||||||
|
DATABASE_URL=postgresql://pokemon_inventory:ci-password@localhost:5433/pokemon_inventory
|
||||||
|
POSTGRES_DB=pokemon_inventory
|
||||||
|
POSTGRES_PASSWORD=ci-password
|
||||||
|
POSTGRES_PORT=5433
|
||||||
|
POSTGRES_USER=pokemon_inventory
|
||||||
|
REDIS_PORT=6380
|
||||||
|
REDIS_URL=redis://localhost:6380
|
||||||
|
TEST_DATABASE_URL=postgresql://pokemon_inventory:ci-password@localhost:5433/pokemon_inventory_test
|
||||||
|
TEST_REDIS_URL=redis://localhost:6380
|
||||||
|
SMTP_URL=smtp://localhost:1025
|
||||||
|
SMTP_FROM=no-reply@example.test
|
||||||
|
MFA_ENCRYPTION_KEY=AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA=
|
||||||
|
EOF
|
||||||
|
npm run db:up
|
||||||
|
docker compose exec -T postgres createdb -U pokemon_inventory pokemon_inventory_test || true
|
||||||
|
DATABASE_URL=postgresql://pokemon_inventory:ci-password@localhost:5433/pokemon_inventory_test npm run db:migrate
|
||||||
- run: npx playwright install --with-deps chromium
|
- run: npx playwright install --with-deps chromium
|
||||||
- run: npm test
|
- run: npm test
|
||||||
|
- name: Run integration tests
|
||||||
|
env:
|
||||||
|
TEST_DATABASE_URL: postgresql://pokemon_inventory:ci-password@localhost:5433/pokemon_inventory_test
|
||||||
|
TEST_REDIS_URL: redis://localhost:6380
|
||||||
|
run: npm run test:integration
|
||||||
- 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