Open rohit-gohri opened 2 years ago
For context, the Puppeteer v19.00 update moved the Chromium binary download location to ~/.cache/puppeteer
(global) from the previous Puppeteer node_modules .local-chromium
(local) location
Looks like Percy uses the previous .local-chromium
location
https://github.com/percy/cli/blob/bf551295a8a618502bb2db92ff302e19dc956b51/packages/core/src/install.js#L129
You might see incompatibilities between expected Chromium versions but you can let Percy use the new location:
.percy.js
const { executablePath } = require('puppeteer')
module.exports = {
discovery: {
launchOptions: {
executable: executablePath()
}
},
version: 2
}
The problem
I am running percy snapshot in my CI pipeline and it currently downloads chromium everytime. I have tried setting
PERCY_BROWSER_EXECUTABLE=true
but that doesn't help becausenpm ci
deletesnode_modules
at the start and for yarn we don't cachenode_modules
but the yarn cache folder (.yarn/cache
for berry).Environment
@percy/cli
version: 1.0.0-beta.76Details
There should be a global directory for caching/downloading chromium for percy. Similar to how Cypress stores it's binaries in
~/.cache/Cypress
and we can cache that separately fromnode_modules
.See cypress docs for more details: https://docs.cypress.io/guides/continuous-integration/introduction#Caching
Debug logs
First Build: https://github.com/rohit-gohri/redocusaurus/actions/runs/1975488916/attempts/1 Second Build: https://github.com/rohit-gohri/redocusaurus/runs/5526059529?check_suite_focus=true
Both of them have the logs
Code to reproduce issue
Github Workflow: https://github.com/rohit-gohri/redocusaurus/blob/56b2e916f385cdff14c5466f045370952c1f75d2/.github/workflows/e2e.yml