Skip to content

Commit 0d35c77

Browse files
feat: update CI to install Playwright for all projects and add root dependencies
- Add @playwright/test and playwright to root package.json devDependencies - Update CI workflow to install Playwright browsers for all projects, not just bi-directional - Update artifact collection to handle both Cypress and Playwright test results - Ensure all projects using Playwright have browser dependencies available in CI This ensures that the dynamic-remotes example and any other projects using Playwright will have the necessary browser binaries installed during CI execution. 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <[email protected]>
1 parent 813592f commit 0d35c77

File tree

2 files changed

+19
-19
lines changed

2 files changed

+19
-19
lines changed

.github/workflows/on-pull-request.yml

Lines changed: 17 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -264,22 +264,17 @@ jobs:
264264
npx cypress verify || true
265265
fi
266266
267-
- name: Install Playwright for projects that need it
267+
- name: Install Playwright browsers for all projects
268268
run: |
269-
if [ "${{ matrix.container }}" = "bi-directional" ]; then
270-
echo "Setting up Playwright for bi-directional example..."
271-
cd ${{ matrix.container }}
272-
273-
# Check if we need to install Playwright browsers
274-
if [ ! -d "$HOME/.cache/ms-playwright" ] || [ -z "$(ls -A $HOME/.cache/ms-playwright 2>/dev/null)" ]; then
275-
echo "Installing Playwright browsers and dependencies..."
276-
npx playwright install --with-deps chromium
277-
else
278-
echo "Playwright browsers already cached, installing system dependencies only..."
279-
npx playwright install-deps chromium
280-
fi
281-
282-
cd ..
269+
echo "Installing Playwright browsers for all projects..."
270+
271+
# Check if we need to install Playwright browsers
272+
if [ ! -d "$HOME/.cache/ms-playwright" ] || [ -z "$(ls -A $HOME/.cache/ms-playwright 2>/dev/null)" ]; then
273+
echo "Installing Playwright browsers and dependencies..."
274+
npx playwright install --with-deps chromium
275+
else
276+
echo "Playwright browsers already cached, installing system dependencies only..."
277+
npx playwright install-deps chromium
283278
fi
284279
285280
- name: Run sample webpack e2e tests
@@ -298,11 +293,14 @@ jobs:
298293
pnpm --filter "${{ matrix.container }}" e2e:ci
299294
(lsof -i tcp:3000-3999 -i tcp:4000-4999 -i tcp:8080-8100 | awk 'NR!=1 {print $2}' | xargs -r kill) 2> /dev/null
300295
301-
- name: Create artifacts for Allure report
302-
id: create-artifacts-allure-report
296+
- name: Create artifacts for test reports
297+
id: create-artifacts-test-reports
303298
uses: actions/upload-artifact@v4
304299
if: always()
305300
with:
306-
name: allure-results
307-
path: 'cypress/results/allure-results'
301+
name: test-results-${{ matrix.container }}
302+
path: |
303+
${{ matrix.container }}/cypress/results/allure-results
304+
${{ matrix.container }}/playwright-report
305+
${{ matrix.container }}/test-results
308306
retention-days: 7

package.json

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -175,6 +175,7 @@
175175
]
176176
},
177177
"devDependencies": {
178+
"@playwright/test": "^1.54.2",
178179
"@shelex/cypress-allure-plugin": "2.40.2",
179180
"@types/node": "20.9.0",
180181
"abbrev": "2.0.0",
@@ -194,6 +195,7 @@
194195
"lerna": "8.1.8",
195196
"lint-staged": "^15.2.10",
196197
"mocha": "10.6.0",
198+
"playwright": "^1.54.2",
197199
"prettier": "3.3.3",
198200
"pretty-quick": "4.0.0",
199201
"semver": "7.6.3",

0 commit comments

Comments
 (0)