Skip to content

Commit 11926e6

Browse files
committed
much cleaner ci
1 parent 0085ce5 commit 11926e6

File tree

1 file changed

+10
-39
lines changed

1 file changed

+10
-39
lines changed

.github/workflows/e2e.yml

Lines changed: 10 additions & 39 deletions
Original file line numberDiff line numberDiff line change
@@ -14,50 +14,26 @@ jobs:
1414
name: Playwright E2E
1515
runs-on: ubuntu-latest
1616
timeout-minutes: 15
17+
env:
18+
API_BASE_URL: http://localhost:9090
19+
OIDC_ISSUER_URL: http://localhost:4000
20+
OIDC_CLIENT_ID: better-auth-dev
21+
OIDC_CLIENT_SECRET: dev-secret-change-in-production
22+
NEXT_PUBLIC_OIDC_PROVIDER_ID: okta
23+
BETTER_AUTH_URL: http://localhost:3000
24+
BETTER_AUTH_SECRET: ci-test-secret-at-least-32-chars-long
1725
steps:
1826
- name: Checkout
19-
uses: actions/checkout@93cb6efe18208431cddfb8368fd83d5badbf9bfd # v5.0.1
27+
uses: actions/checkout@v4
2028

2129
- name: Setup
2230
uses: ./.github/actions/setup
2331

2432
- name: Install Playwright browsers
2533
run: pnpm exec playwright install --with-deps chromium
2634

27-
- name: Start dev stack (Next + OIDC + Mock)
28-
env:
29-
API_BASE_URL: http://localhost:9090
30-
OIDC_ISSUER_URL: http://localhost:4000
31-
OIDC_CLIENT_ID: better-auth-dev
32-
OIDC_CLIENT_SECRET: dev-secret-change-in-production
33-
NEXT_PUBLIC_OIDC_PROVIDER_ID: okta
34-
BETTER_AUTH_URL: http://localhost:3000
35-
BETTER_AUTH_SECRET: ci-test-secret-not-for-production
36-
run: |
37-
pnpm dev &
38-
echo $! > dev.pid
39-
# Wait for Next (3000), OIDC (4000 - use discovery endpoint), and Mock API (9090 - use health endpoint)
40-
for url in http://localhost:3000 http://localhost:4000/.well-known/openid-configuration http://localhost:9090/health; do
41-
echo "Waiting for $url..."
42-
up=false
43-
for i in {1..30}; do
44-
if curl -sf "$url" >/dev/null; then
45-
echo "$url is up"
46-
up=true
47-
break
48-
fi
49-
sleep 2
50-
done
51-
if [ "$up" = false ]; then
52-
echo "ERROR: $url failed to start"
53-
exit 1
54-
fi
55-
done
56-
5735
- name: Run Playwright tests
58-
env:
59-
BASE_URL: http://localhost:3000
60-
run: pnpm run test:e2e
36+
run: pnpm test:e2e
6137

6238
- name: Upload test artifacts
6339
uses: actions/upload-artifact@v4
@@ -68,8 +44,3 @@ jobs:
6844
test-results/
6945
playwright-report/
7046
retention-days: 7
71-
72-
- name: Cleanup dev
73-
if: always()
74-
run: |
75-
if [ -f dev.pid ]; then kill $(cat dev.pid) || true; fi

0 commit comments

Comments
 (0)