diff --git a/build.gradle b/build.gradle index f7a9181..c305bf5 100644 --- a/build.gradle +++ b/build.gradle @@ -28,13 +28,23 @@ tasks.register('coverage') { } tasks.register('frontendE2E', Exec) { - description = 'Run Playwright E2E tests in Docker (CI mode)' - workingDir = file("${rootProject.projectDir}/frontend") - commandLine 'npm', 'run', 'test:e2e:ci' + group = 'verification' + description = 'Run Playwright E2E tests in Docker (same stack as Forgejo CI)' + dependsOn frontendTest + workingDir = rootProject.projectDir + environment 'POSTGRES_DB', 'bilhej' + environment 'POSTGRES_USER', 'bilhej' + environment 'POSTGRES_PASSWORD', 'test_pw_ci_123' + environment 'JWT_SECRET', 'aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa' + environment 'STRIPE_SECRET_KEY', 'sk_test_fake' + environment 'STRIPE_WEBHOOK_SECRET', 'whsec_fake' + environment 'STRIPE_PRICE_ID', 'price_fake' + commandLine 'docker', 'compose', '-f', 'docker-compose.e2e.yml', + 'up', '--build', '--abort-on-container-exit', '--exit-code-from', 'playwright' } tasks.named('check').configure { - dependsOn frontendLint, frontendTest + dependsOn frontendLint, frontendTest, frontendE2E } tasks.register('up', Exec) { diff --git a/frontend/package.json b/frontend/package.json index a35efb0..ec3c316 100644 --- a/frontend/package.json +++ b/frontend/package.json @@ -13,7 +13,7 @@ "test:watch": "vitest", "test:coverage": "vitest run --coverage", "test:e2e": "playwright test", - "test:e2e:ci": "docker compose -f ../docker-compose.ci.yml up --build --abort-on-container-exit --exit-code-from playwright" + "test:e2e:ci": "docker compose -f ../docker-compose.e2e.yml up --build --abort-on-container-exit --exit-code-from playwright" }, "dependencies": { "pinia": "^3.0.4",