Fix caching and fonts in playwright.yml #212
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
When playwright is installed (i.e., not pulled from cache), the
--with-deps
flag causes it to pull in system dependencies as well. That makes the current caching strategy incoherent, as those dependencies will not be part of the cache as defined. Causing different behavior when pulling from cache vs installing fresh.In particular, some of the dependencies it pulls in are fonts, which causes the output of the test to change due to the available fonts changing.
In fact, fonts are the only dependencies it pulls in, everything else is already present in the stock ubuntu image. So it seems fine to just remove
--with-deps
and just pull in the image. If we discover we need system deps at any point, we can usenpx playwright install-deps chromium
in a separate command to pull in those deps, and figure out an alternate caching strategy for them.