Skip to content

Commit 2930d26

Browse files
DavertMikclaude
andcommitted
feat: add debug workflow to identify timeout issue
Creates separate CI jobs for each Playwright test file with 3-minute timeouts. Uses fail-fast: false to continue even if one job fails. This will help identify which specific test file causes the 18-minute timeout. 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <noreply@anthropic.com>
1 parent cdfa081 commit 2930d26

File tree

1 file changed

+63
-0
lines changed

1 file changed

+63
-0
lines changed
Lines changed: 63 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,63 @@
1+
name: Playwright Tests Debug
2+
3+
on:
4+
push:
5+
branches: [feat/esm]
6+
pull_request:
7+
branches: [feat/esm, 3.x]
8+
9+
jobs:
10+
test-playwright-files:
11+
runs-on: ubuntu-latest
12+
13+
strategy:
14+
fail-fast: false
15+
matrix:
16+
test-file:
17+
- 'within_test.js'
18+
- 'config_test.js'
19+
- 'react_test.js'
20+
- 'session_test.js'
21+
22+
steps:
23+
- uses: actions/checkout@v4
24+
- name: Use Node.js ${{ matrix.node-version }}
25+
uses: actions/setup-node@v4
26+
with:
27+
node-version: 20.x
28+
- uses: shivammathur/setup-php@v2
29+
with:
30+
php-version: 7.4
31+
- name: npm install
32+
run: |
33+
npm i --force
34+
env:
35+
PUPPETEER_SKIP_CHROMIUM_DOWNLOAD: true
36+
- name: Allow Release info Change
37+
run: |
38+
sudo apt-get update --allow-releaseinfo-change
39+
- name: Install browsers and deps
40+
run: npx playwright install && npx playwright install-deps
41+
- name: check
42+
run: './bin/codecept.js check -c test/acceptance/codecept.Playwright.js'
43+
timeout-minutes: 2
44+
- name: start a server
45+
run: 'php -S 127.0.0.1:8000 -t test/data/app &'
46+
- name: start json-server
47+
run: 'npm run json-server &'
48+
- name: wait for servers
49+
run: 'sleep 3'
50+
- name: Create config for ${{ matrix.test-file }}
51+
run: |
52+
cp test/acceptance/codecept.Playwright.js test/acceptance/codecept.Playwright.${{ matrix.test-file }}.js
53+
sed -i "s/tests: '.\/\\*_test.js'/tests: '.\\/${{ matrix.test-file }}'/" test/acceptance/codecept.Playwright.${{ matrix.test-file }}.js
54+
- name: run ${{ matrix.test-file }} with restart==browser
55+
run: 'BROWSER_RESTART=browser ./bin/codecept.js run -c test/acceptance/codecept.Playwright.${{ matrix.test-file }}.js --grep @Playwright --debug --verbose'
56+
timeout-minutes: 3
57+
continue-on-error: true
58+
- name: Upload screenshots on failure
59+
if: failure()
60+
uses: actions/upload-artifact@v3
61+
with:
62+
name: screenshots-${{ matrix.test-file }}
63+
path: test/acceptance/output/

0 commit comments

Comments
 (0)