DEPRECATED: Use
playwright
CLI instead e.g.,playwright install-deps chromium
. See https://playwright.dev/docs/cli/#install-system-dependencies.
GitHub action to setup playwright
in your CI workflows. Installs the system dependencies required to run cross-browser tests on Chromium, WebKit, and Firefox with Playwright.
Originally based on https://github.com/microsoft/playwright-github-action.
Add a uses: maxmilton/action-setup-playwright@v1
step to your GitHub workflow definition:
name: ci
on: push
jobs:
e2e:
runs-on: ubuntu-latest
timeout-minutes: 10 # in case a browser hangs
steps:
- uses: actions/checkout@v2
- uses: actions/setup-node@v2
- uses: maxmilton/action-setup-playwright@v1
with:
browsers: chromium, firefox, webkit # optional
headless: true # optional
- run: yarn install --frozen-lockfile
- run: yarn run build
- run: yarn run test-e2e
This action can also execute tests in headful mode. To do this, set the optional headless
input to false
:
steps:
- uses: maxmilton/action-setup-playwright@v1
with:
headless: false
Then use xvfb-run
on a Linux agent:
# Windows/macOS
$ yarn run test
# Linux
$ xvfb-run --auto-servernum -- yarn run test
By default system dependencies for all browsers are installed, however, you can limit this to specific browsers only. Set the optional browsers
input to a comma-separated list of the browsers you intend to launch:
steps:
- uses: maxmilton/action-setup-playwright@v1
with:
browsers: chromium, firefox, webkit
Please report any bugs you encounter on the GitHub issue tracker.
See releases on GitHub.
maxmilton/action-setup-playwright
is an MIT licensed open source project. See LICENSE.
© 2021 Max Milton