Closed hugetiny closed 4 years ago
We run Playwright tests using GH actions with the following recipes: https://github.com/microsoft/playwright/tree/master/.github/workflows.
Note that we run both headless and headful tests, so we use xvfb, but regular Playwright customers should not need that, everything should just run headlessly.
Thanks @hugetiny. I created this example project that shows how to run Playwright scripts on GH Actions: https://github.com/arjun27/playwright-github-actions
Thanks @arjun27 for the repository!
When I try to run my tests I get Running as root without --no-sandbox is not supported
, on Firefox I get Failed to launch browser!
, ideas?
name: Functional Tests
on: [push]
jobs:
functional-chromium:
name: Chromium Functional Tests
runs-on: ubuntu-latest
container:
image: arjun27/playwright-bionic:0.1.0
steps:
- run: npm i -g yarn
- uses: actions/checkout@v2
- uses: bahmutov/npm-install@v1
- run: node ./node_modules/playwright/install.js
- run: yarn test:functional
env:
BROWSER: chromium
(this is my code: https://github.com/popperjs/popper-core/pull/990)
Thanks @FezVrasta, investigating this issue here: https://github.com/arjun27/playwright-github-actions/issues/1
Curiously, the error message that you are running into (Running as root without --no-sandbox is not supported
) is thrown by Chromium - Firefox seems to throw a different string for me (see aforementioned issue). Would be helpful to get a confirmation just in case it's a separate issue.
@fezvrasta - Firefox is now working, please use arjun27/playwright-bionic:0.1.1
as the container image. Closing this issue.
With that image I can't npm i -g yarn
anymore. :-(
Error: EACCES: permission denied, access '/usr/lib/node_modules'
Can I do an automation test with playwright in github actions?