-
Notifications
You must be signed in to change notification settings - Fork 0
52 lines (44 loc) · 1.37 KB
/
Copy pathbrowser-test.yml
File metadata and controls
52 lines (44 loc) · 1.37 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
name: Headless Browser Test — DragonSoul Web
on:
push:
branches:
- 'claude/**'
workflow_dispatch:
jobs:
browser-test:
runs-on: ubuntu-latest
timeout-minutes: 15
steps:
- name: Checkout repo
uses: actions/checkout@v4
- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: '22'
- name: Install Playwright
run: |
npm init -y
npm install @playwright/test
npx playwright install chromium --with-deps
- name: Start HTTP server
run: |
python3 -m http.server 8080 --directory proto/output/web/ &
echo "HTTP server PID: $!"
# Wait for server to be ready
for i in {1..10}; do
curl -s -o /dev/null -w "%{http_code}" http://localhost:8080/ | grep -q 200 && break
echo "Waiting for server... ($i/10)"
sleep 1
done
curl -s -o /dev/null -w "Server HTTP status: %{http_code}\n" http://localhost:8080/
- name: Run Playwright test
run: node .github/scripts/browser-test.js
timeout-minutes: 5
- name: Upload test artifacts
if: always()
uses: actions/upload-artifact@v4
with:
name: dragonsoul-browser-test-${{ github.sha }}
path: |
/tmp/dragonsoul-test/
retention-days: 7