arrow-left Back to topicQuizContinuous IntegrationCheck yourself1.Your GitHub Actions workflow runs 'npx playwright install' (without --with-deps) and gets 'Error: Failed to launch browser'. What's happening and how do you fix it?The Playwright version is incompatible with the Node.js version — update Node.jsnpx playwright install downloads browser binaries but not OS-level system dependencies — change to npx playwright install --with-deps to also install libglib, libnss, and other Linux libs the browser needsThe ubuntu-latest runner doesn't support Chromium — switch to a different browser2.A Playwright test fails on CI. You check GitHub Actions and there's no playwright-report artifact to download. What configuration change would have prevented this?Add continue-on-error: true to the test step so the job doesn't failAdd if: ${{ !cancelled() }} to the artifact upload step — without it, a failed job skips all remaining steps including the uploadMove the artifact upload step before the test step3.Which GitHub Actions YAML trigger runs Playwright tests on every push to main and every pull request targeting main?on: [push]on:\n push:\n branches: [ main ]\n pull_request:\n branches: [ main ]on: workflow_dispatchon:\n deployment_status:4.Why does Playwright run in headless mode by default on CI?Headless is faster because it uses less CPUCI runners don't have a display server, so headed mode would crash immediatelyHeadless produces smaller trace filesPlaywright requires headless on Linux regardless of environment5.You want to upload the Playwright HTML report as an artifact that is retained for 30 days and available even when tests fail. Which step configuration achieves this?uses: actions/upload-artifact@v4 with path: playwright-report/ and no conditionuses: actions/upload-artifact@v4 with if: success() and retention-days: 30uses: actions/upload-artifact@v4 with if: ${{ !cancelled() }} and retention-days: 30uses: actions/upload-artifact@v4 with if: failure() and retention-days: 306.You have 800 tests and want to split them across 4 CI machines using sharding and then get one combined report. Which reporter should each shard use?reporter: 'html' — HTML reports from each shard get merged automaticallyreporter: 'list' — lightweight output that CI can mergereporter: 'blob' — produces a zip with raw test data that can be merged with npx playwright merge-reportsreporter: 'json' — JSON files from all shards can be concatenated7.The article recommends NOT caching browser binaries between CI runs. What is the main reason?Caching browser binaries is not supported by GitHub ActionsThe time to restore from cache is similar to re-downloading, and on Linux the OS dependencies aren't cacheable anywayCached binaries can become corrupted and cause flaky testsEach browser version requires a separate cache key that is hard to manage8.What does npx playwright install --with-deps do that plain npx playwright install does not?It installs the latest version of Playwright instead of the version pinned in package.jsonIt installs all three browsers (Chromium, Firefox, WebKit) instead of just ChromiumIt runs sudo apt-get install for OS-level libraries (libglib, libnss, libatk, etc.) that browser binaries depend onIt also installs the Playwright VS Code extension automaticallySubmit answersarrow-left PreviousSetting up CIDockerNext arrow-right