Skip to content

Commit fdb01c0

Browse files
authored
Split playwright tests to multiple runners by project (#789)
1 parent ca6bf7d commit fdb01c0

File tree

2 files changed

+39
-5
lines changed

2 files changed

+39
-5
lines changed

.github/workflows/test-ui.yaml

Lines changed: 38 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -23,19 +23,53 @@ jobs:
2323
npm test -- --verbose
2424
working-directory: ComfyUI_frontend
2525

26-
playwright-tests:
26+
playwright-tests-chromium:
2727
runs-on: ubuntu-latest
2828
steps:
2929
- uses: Comfy-Org/ComfyUI_frontend_setup_action@v1
3030
- name: Install Playwright Browsers
3131
run: npx playwright install chromium --with-deps
3232
working-directory: ComfyUI_frontend
33-
- name: Run Playwright tests
34-
run: npx playwright test
33+
- name: Run Playwright tests (Chromium)
34+
run: npx playwright test --project=chromium
3535
working-directory: ComfyUI_frontend
3636
- uses: actions/upload-artifact@v4
3737
if: always()
3838
with:
39-
name: playwright-report
39+
name: playwright-report-chromium
40+
path: ComfyUI_frontend/playwright-report/
41+
retention-days: 30
42+
43+
playwright-tests-chromium-2x:
44+
runs-on: ubuntu-latest
45+
steps:
46+
- uses: Comfy-Org/ComfyUI_frontend_setup_action@v1
47+
- name: Install Playwright Browsers
48+
run: npx playwright install chromium --with-deps
49+
working-directory: ComfyUI_frontend
50+
- name: Run Playwright tests (Chromium 2x)
51+
run: npx playwright test --project=chromium-2x
52+
working-directory: ComfyUI_frontend
53+
- uses: actions/upload-artifact@v4
54+
if: always()
55+
with:
56+
name: playwright-report-chromium-2x
57+
path: ComfyUI_frontend/playwright-report/
58+
retention-days: 30
59+
60+
playwright-tests-mobile-chrome:
61+
runs-on: ubuntu-latest
62+
steps:
63+
- uses: Comfy-Org/ComfyUI_frontend_setup_action@v1
64+
- name: Install Playwright Browsers
65+
run: npx playwright install chromium --with-deps
66+
working-directory: ComfyUI_frontend
67+
- name: Run Playwright tests (Mobile Chrome)
68+
run: npx playwright test --project=mobile-chrome
69+
working-directory: ComfyUI_frontend
70+
- uses: actions/upload-artifact@v4
71+
if: always()
72+
with:
73+
name: playwright-report-mobile-chrome
4074
path: ComfyUI_frontend/playwright-report/
4175
retention-days: 30

playwright.config.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@ export default defineConfig({
5959

6060
/* Test against mobile viewports. */
6161
{
62-
name: 'Mobile Chrome',
62+
name: 'mobile-chrome',
6363
use: { ...devices['Pixel 5'], hasTouch: true },
6464
grep: /@mobile/ // Run only tests tagged with @mobile
6565
}

0 commit comments

Comments
 (0)