-
Notifications
You must be signed in to change notification settings - Fork 2
70 lines (56 loc) · 1.78 KB
/
test-e2e.yaml
File metadata and controls
70 lines (56 loc) · 1.78 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
name: 🧪 E2E Tests
on:
push:
branches:
- main
pull_request:
branches:
- main
env:
CI: true
# Cloudflare Wrangler will use local mode for D1/KV/R2
# Sanity is mocked in tests, so these env vars aren't critical
PUBLIC_SANITY_PROJECT_ID: test
PUBLIC_SANITY_DATASET: test
PUBLIC_ECHO_SANITY_PROJECT_ID: test
PUBLIC_ECHO_SANITY_DATASET: test
# Required to build and run application
PUBLIC_GITHUB_SHA: testing
RESEND_API_KEY: re_123something
PUBLIC_CLOUDFLARE_TURNSTILE_SITE_KEY: 1x00000000000000000000AA
CLOUDFLARE_TURNSTILE_SITE_SECRET: 1x0000000000000000000000000000000AA
jobs:
test:
name: 🧪 Run E2E Tests
timeout-minutes: 20
runs-on: ubuntu-latest
steps:
- name: 🔍 Checkout
uses: actions/checkout@v5
- name: 📦 Setup pnpm
uses: pnpm/action-setup@v4
- name: 🐢 Setup node
uses: actions/setup-node@v4
with:
node-version: 22
cache: pnpm
cache-dependency-path: ./pnpm-lock.yaml
- name: 📦 Install dependencies
run: pnpm install --frozen-lockfile
- name: 🎭 Install Playwright browsers
run: pnpm --filter=web exec playwright install --with-deps
- name: 🔧 Setup Wrangler environment variables
working-directory: programmerbar-web
run: |
echo "RESEND_API_KEY=${{ env.RESEND_API_KEY }}" > .dev.vars
- name: 📦 Run migrations
run: pnpm --filter=web run db:migrate:local
- name: 🧪 Run Playwright tests
run: pnpm --filter=web test:e2e
- name: 📤 Upload test results
if: always()
uses: actions/upload-artifact@v5
with:
name: playwright-report
path: programmerbar-web/playwright-report/
retention-days: 30