arrow-left Back to topicQuizSetting up CICheck yourself1.Your Playwright tests run fine locally but fail on GitHub Actions with 'error while loading shared libraries'. What's the most likely cause?The Node.js version on CI is different from localYou ran 'npx playwright install' without '--with-deps' — system libraries for browsers are missingThe playwright-report artifact wasn't uploaded2.Tests pass on CI but the HTML report wasn't saved. You used 'if: success()' on the upload step. What should you use instead?if: always() — upload on every run regardless of resultif: ${{ !cancelled() }} — upload unless the job was manually cancelledif: failure() — upload only when tests fail3.The ci-intro article focuses on setting up CI for Playwright. Which CI service does it primarily cover with a full working example?GitLab CICircleCIGitHub ActionsJenkins4.What are the correct ordered steps to set up basic Playwright CI on GitHub Actions according to the article?checkout → npx playwright install --with-deps → npm ci → npx playwright test → upload artifactcheckout → setup-node → npm ci → npx playwright install --with-deps → npx playwright test → upload artifactnpm ci → checkout → npx playwright install → npx playwright test → upload artifactcheckout → npm ci → npx playwright test → npx playwright install --with-deps → upload artifact5.How do you pass a dynamic base URL (for example, from a Vercel preview deployment) to Playwright tests running in GitHub Actions?Hardcode the URL in playwright.config.ts before each CI runPass it as an environment variable (e.g. PLAYWRIGHT_TEST_BASE_URL) in the workflow step's env blockUse a GitHub Actions secret and reference it with ${{ secrets.BASE_URL }}Add the URL as a query parameter in the test command: npx playwright test --base-url=https://...6.A CI test fails. You open GitHub Actions but find no playwright-report artifact in the Artifacts section. You did NOT use if: ${{ !cancelled() }}. Why is the artifact missing?The artifact was deleted because the job ran too longGitHub Actions skips all subsequent steps by default when a step fails, so the upload step was never executedThe playwright-report directory was empty so GitHub didn't create the artifactArtifact uploads require manual approval in failed jobs7.After downloading a playwright-report zip artifact from CI, you try to open index.html directly in your browser but the report doesn't display correctly. What should you do instead?Upload the zip to trace.playwright.dev to view it onlineExtract the zip and run npx playwright show-report pointing at the extracted folderOpen the zip in VS Code and use the Live Preview extensionRe-run the test locally to generate a fresh report8.On GitHub Actions, how do you run only the Playwright tests affected by a PR's changes to speed up feedback, while still running all tests on merge to main?Use npx playwright test --only-changed=origin/$GITHUB_BASE_REF on PRs, and npx playwright test (full) on push to mainManually tag which tests are relevant in each PR descriptionUse test.skip() in test files that haven't changedConfigure GitHub Actions to cache test results and skip re-running unchanged filesSubmit answersarrow-left PreviousShardingContinuous IntegrationNext arrow-right