Browsers ready in CI

Install the Playwright runtime and selected browsers on a GitHub Actions runner while keeping project setup and test execution explicit.

  • Runner setup Install the runtime and selected browsers
  • Explicit inputs Select the browser required by the job
  • Project-owned steps Keep application setup and test execution separate
Runner setup

Install the runtime and selected browsers

The action installs the Playwright npm runtime and selected browser binaries. On Linux, it can also install the browser system dependencies.

setup-playwright package →
Explicit inputs

Select the browser required by the job

Choose Chromium, Firefox, WebKit, a branded browser, or the complete managed set. Keep the selected target visible in the workflow.

GitHub Actions setup →
- uses: playwright-php/setup-playwright@v1
  with:
    playwright-version: 1.62.1
    browsers: chromium
Project-owned steps

Keep application setup and test execution separate

PHP setup, Composer install, application preparation, caching, the test command, and artifact upload remain explicit workflow steps.

Continuous integration →
Next step

Move from the tour to working code.

Choose the explanation, recipe, or runnable example that matches what you need next.

Common questions

Before you wire it into a suite.

Does the action install PHP or Composer dependencies?
No. It installs the Playwright runtime, selected browser binaries, and Linux browser dependencies. PHP and Composer remain separate workflow steps.
Does the action run the browser tests?
No. The project still owns application setup, the test command, and artifact upload.
Does the action cache browser downloads?
No. Add an explicit cache step and pass its path through the action when caching is useful.