Skip to content

Commit

Permalink
Fix playright browser installs due to upstream breaking change (micro…
Browse files Browse the repository at this point in the history
  • Loading branch information
jakebailey authored Sep 14, 2023
1 parent a563de9 commit 47e4448
Show file tree
Hide file tree
Showing 5 changed files with 76 additions and 13 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -97,8 +97,8 @@ jobs:
check-latest: true
- run: npm ci

- name: Adding playwright
run: npm install --no-save --no-package-lock playwright
- name: Installing browsers
run: npx playwright install --with-deps

- name: Validate the browser can import TypeScript
run: npx hereby test-browser-integration
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/release-branch-artifact.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -30,8 +30,8 @@ jobs:
run: |
npm ci
npm test
- name: Adding playwright
run: npm install --no-save --no-package-lock playwright
- name: Installing browsers
run: npx playwright install --with-deps
- name: Validate the browser can import TypeScript
run: npx hereby test-browser-integration
- name: LKG, clean, and pack
Expand Down
70 changes: 70 additions & 0 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,7 @@
"mocha-fivemat-progress-reporter": "^0.1.0",
"ms": "^2.1.3",
"node-fetch": "^3.2.10",
"playwright": "^1.38.0",
"source-map-support": "^0.5.21",
"tslib": "^2.5.0",
"typescript": "^5.0.2",
Expand Down
10 changes: 1 addition & 9 deletions scripts/browserIntegrationTest.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -5,15 +5,7 @@ import {
import {
join,
} from "path";

let playwright;
try {
// @ts-ignore-error
playwright = await import("playwright");
}
catch (error) {
throw new Error("Playwright is expected to be installed manually before running this script");
}
import playwright from "playwright";

// Turning this on will leave the Chromium browser open, giving you the
// chance to open up the web inspector.
Expand Down

0 comments on commit 47e4448

Please sign in to comment.