-
Notifications
You must be signed in to change notification settings - Fork 17
Fixes tests for GitHub actions. #272
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -5,14 +5,9 @@ import puppeteer from 'puppeteer'; | |
| // Open our browser. | ||
| const browser = await puppeteer.launch({ | ||
| timeout: 10000, | ||
| // opt-in to the new Chrome headless implementation | ||
| // ref: https://developer.chrome.com/articles/new-headless/ | ||
| headless: 'new', | ||
| args: [ | ||
| // Disables interactive prompt: Do you want to the application Chromium.app to accept incoming network connections? | ||
| // ref: https://github.com/puppeteer/puppeteer/issues/4752#issuecomment-586599843 | ||
| '--disable-features=DialMediaRouteProvider', | ||
|
Collaborator
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I checked the linked issue and it seemed like it was closed. |
||
| ], | ||
| // These args fix “Error: Failed to launch the browser process!” when | ||
| // run in GitHub. We are only running our own code here, so this is ok. | ||
| args: ['--no-sandbox', '--disable-setuid-sandbox'], | ||
|
Collaborator
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Would love a cross-check on this one. I think this is what we need to do now in GitHub based on our settings? |
||
| }); | ||
| const page = await browser.newPage(); | ||
|
|
||
|
|
@@ -66,6 +61,9 @@ import puppeteer from 'puppeteer'; | |
| // Close our browser. | ||
| await browser.close(); | ||
| } catch (err) { | ||
| // Ensure that we “Bail out!” (see TAP specification) if script fails. Note | ||
| // that the tap stream is being read on stdout. | ||
| console.log('Bail out!'); // eslint-disable-line no-console | ||
|
Collaborator
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. FYI @klebba — we should bake this sort of thing into all our |
||
| // Ensure we exit with a non-zero code if anything fails (e.g., timeout). | ||
| console.error(err); // eslint-disable-line no-console | ||
| process.exit(1); | ||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think this setting is outdated now?