-
-
Notifications
You must be signed in to change notification settings - Fork 1.7k
ci: Run browser integration tests also on Firefox and Webkit #4232
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
ci: Run browser integration tests also on Firefox and Webkit #4232
Conversation
We configure a job matrix to run browser tests in parallel, even though Karma could connect to all browsers at once. The reason for this is that, if run time is not a concern (less than 2min at the moment), running each browser as a separate job seemed more robust and easier to spot browser-specific problems when a test fails. We get all browser binaries from Playwright, so we don't need to rely on versions installed on the host system. (And this is also the easiest way to get a headless Webkit browser on Ubuntu) We include the Playwright browsers in cache to avoid having to download them again over and over. We install Webkit system dependencies on every run of the Webkit tests because it is inconvenient to cache and restore system dependencies. Installing then is safer, and perhaps even faster, than dealing with the cache.
size-limit report
|
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.
LGTM!
needs: job_build | ||
runs-on: ubuntu-latest | ||
timeout-minutes: 15 | ||
timeout-minutes: 10 |
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.
Reducing this from 15 to 10 (another value we use in jobs in this workflow) to emphasize these tests should run relatively fast. The 10 min timeout is for each browser/job.
@@ -10,6 +10,7 @@ env: | |||
CACHED_DEPENDENCY_PATHS: | | |||
${{ github.workspace }}/node_modules | |||
${{ github.workspace }}/packages/**/node_modules | |||
~/.cache/ms-playwright/ |
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.
An alternative to this was to
Set
PLAYWRIGHT_BROWSERS_PATH=0
as the environment variable before runningnpm install
. This will download the browser binaries in thenode_modules
directory and cache them with the package code.
We configure a job matrix to run browser tests in parallel, even though Karma could connect to all browsers at once. The reason for this is that, if run time is not a concern (less than 2min at the moment), running each browser as a separate job seemed more robust and easier to spot browser-specific problems when a test fails. We get all browser binaries from Playwright, so we don't need to rely on versions installed on the host system. (And this is also the easiest way to get a headless Webkit browser on Ubuntu) We include the Playwright browsers in cache to avoid having to download them again over and over. We install Webkit system dependencies on every run of the Webkit tests because it is inconvenient to cache and restore system dependencies. Installing then is safer, and perhaps even faster, than dealing with the cache.
This is a follow up to #4226, expanding the target browsers from Chrome to Chrome + Firefox + Webkit.
We configure a job matrix to run browser tests in parallel, even though Karma could connect to all browsers at once. The reason for this is that, if run time is not a concern (less than 2min at the moment), running each browser as a separate job seemed more robust and easier to spot browser-specific problems when a test fails.
We get all browser binaries from Playwright, so we don't need to rely on versions installed on the host system. (And this is also the easiest way to get a headless Webkit browser on Ubuntu)
We include the Playwright browsers in cache to avoid having to download them again over and over.
We install Webkit system dependencies on every run of the Webkit tests because it is inconvenient to cache and restore system dependencies. Installing then is safer, and perhaps even faster, than dealing with the cache.