Giter VIP home page Giter VIP logo

playwright-github-action's Introduction

Playwright GitHub Action

tests

Set up GitHub Actions to run cross-browser tests on Chromium, WebKit and Firefox with Playwright.

❌ You don't need this GitHub Action

We recommend using the Playwright CLI instead of this GitHub Action.

One of the reasons for deprecating the GitHub Actions is that it doesn't know which version of Playwright is installed, which then requires installing many more dependencies to ensure support.

We highly discourage the use of the GitHub Action. See next section for using the CLI.

✅ Use the Playwright CLI

Starting with Playwright v1.8.0 it includes a CLI that installs all required browser dependencies.

To install dependencies with a CLI:

npx playwright install-deps # install dependencies for all browsers
npx playwright install-deps chromium # install dependencies for Chromium only

Playwright CLI with GitHub Actions CI

Following is an example usage of the Playwright CLI with a GitHub Actions workflow file. It shows a tests_e2e job which includes steps in which the Playwright CLI invokes the installation of required dependencies (headless browsers, etc) and then invokes the actual npm run script npm run test:e2e for the Playwright test runner:

jobs:
  tests_e2e:
    name: Run end-to-end tests
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v3
      - uses: actions/setup-node@v3
      - name: Install dependencies
        run: npm ci
      - name: Install playwright browsers
        run: npx playwright install --with-deps
      - name: Run tests
        run: npx playwright test

If something doesn't work, please let us know!

⚠️ GitHub Action Usage (deprecated)

Add uses: microsoft/playwright-github-action@v1 to the GitHub workflow definition before running your tests.

on:
  push:
    branches:
    - main

jobs:
  e2e-tests:
    runs-on: ubuntu-latest # or macos-latest, windows-latest

    steps:
      - uses: actions/checkout@v2

      - uses: actions/setup-node@v1

      - uses: microsoft/playwright-github-action@v1

      - name: Install dependencies and run tests
        run: npm install && npm test

Upload artifacts

This GitHub Action can be combined with the Upload Artifact action to upload test artifacts (like screenshots or logs).

steps:
- uses: microsoft/playwright-github-action@v1

- name: Install dependencies and run tests
  run: npm install && npm test

- uses: actions/upload-artifact@v2
  if: ${{ always() }}
  with:
    name: test-artifacts
    path: path/to/artifacts

Run in headful mode

This GitHub Action can also execute tests in headful mode. To do this, use xvfb-run on a Linux agent.

# Windows/macOS
npm test

# Linux
xvfb-run --auto-servernum -- npm test

Resources

playwright-github-action's People

Contributors

arjunattam avatar aslushnikov avatar bdougie avatar dependabot[bot] avatar dgozman avatar joeleinbinder avatar leonardodino avatar lirantal avatar microsoft-github-operations[bot] avatar microsoftopensource avatar mxschmitt avatar yury-s avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

playwright-github-action's Issues

How to cache Playwright installation?

It's currently by far the slowest step of my pipeline. It takes more than one minute to install it, in every build.

image

PS: The actions/setup-node@v2 action has cache. It takes only a few seconds to complete.

Remove `sudo` requirement in order to make the action work with act

Hi, I'm trying to run my Playwright GitHub Actions locally in order to generate image snapshots without the issues produced by cross-platform inconsistencies.

To run my actions locally I'm using act, but I'm having a problem because of the lack of sudo support in the ubuntu-latest act image. (the only working one is the complete nektos/act-environments-ubuntu:18.04 image, but it's 18gb)

This is my action config:

jobs:
  functional-chromium:
    name: Chromium Functional Tests
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v2
      - uses: actions/setup-node@v1
        env:
          RUNNER_TEMP: '/tmp/' # this is needed just to make `act` work
      - uses: microsoft/playwright-github-action@v1
      - uses: bahmutov/npm-install@v1
      - run: npm run test:functional
        env:
          BROWSER: chromium
          CI: true

Would it be possible to remove sudo from the required executables? Or do you have other alternatives to run this action locally?

Webkit Not Found on Ubuntu (20.04 & 18.04)

I've been struggling to get webkit working on any ubuntu version using github actions. It works on mac and windows. I'm using playwright-python and running python -m playwright install to install however it's unable to detect the webkit binary on ubuntu.

Is there something further I need to install so that playwright can find the webkit driver?

Here's my GitHub action logs

Log in question

TikTokApi/browser.py:81: in __init__
    self.browser = playwright.webkit.launch(args=self.args, **self.options)
/opt/hostedtoolcache/Python/3.7.9/x64/lib/python3.7/site-packages/playwright/sync_api.py:6158: in launch
    firefoxUserPrefs=mapping.to_impl(firefoxUserPrefs),
/opt/hostedtoolcache/Python/3.7.9/x64/lib/python3.7/site-packages/playwright/sync_base.py:107: in _sync
    return future.result()
/opt/hostedtoolcache/Python/3.7.9/x64/lib/python3.7/site-packages/playwright/browser_type.py:72: in launch
    raise not_installed_error(f'"{self.name}" browser was not found.')
E   Exception: 
E   ================================================================================
E   "webkit" browser was not found.
E   Please complete Playwright installation via running
E   
E       "python -m playwright install"
E   
E   ================================================================================
=========================== short test summary info ============================
ERROR tests/test_byHashtag.py - Exception: 
!!!!!!!!!!!!!!!!!!!! Interrupted: 1 error during collection !!!!!!!!!!!!!!!!!!!!
=============================== 1 error in 1.19s ===============================
Error: Process completed with exit code 2.

Github actions

name: TikTokApi CI
on:
  push:
    branches:
      - master
  pull_request:
    branches:
      - master
      - nightly
      - 'releases/*'

jobs:
  Unit-Tests:
    timeout-minutes: 10
    runs-on: ${{ matrix.os }}
    strategy:
      fail-fast: false
      matrix:
        os: [ubuntu-18.04, ubuntu-20.04, macos-latest, windows-latest]
        python-version: [3.7, 3.8, 3.9]
    steps:
      - uses: actions/checkout@v2
      - uses: actions/setup-node@v1
      - uses: microsoft/playwright-github-action@v1
      - name: Install Python ${{ matrix.python-version }}
        uses: actions/setup-python@v2
        with:
          python-version: ${{ matrix.python-version }}
      - name: Setup dependencies
        run: |
          python -m pip install --upgrade pip
          pip install -r requirements.txt
          pip install pytest
          python -m playwright install

      - name: Run Tests
        run: pytest tests

Occasionally it breaks

This error happens occasionally, I believe the issue is with sudo apt-get update.

"Failed to fetch https://packages.microsoft.com/ubuntu/18.04/prod/dists/bionic/main/binary-amd64/Packages.bz2 File has unexpected size (109105 != 109187). Mirror sync in progress?"

Full logs

2020-05-12T20:01:43.6264342Z ##[group]Run microsoft/playwright-github-action@v1
2020-05-12T20:01:43.6264472Z ##[endgroup]
2020-05-12T20:01:43.6700481Z [command]/usr/bin/sudo apt-get update
2020-05-12T20:01:44.4218012Z Hit:1 http://azure.archive.ubuntu.com/ubuntu bionic InRelease
2020-05-12T20:01:44.4219808Z Get:2 http://azure.archive.ubuntu.com/ubuntu bionic-updates InRelease [88.7 kB]
2020-05-12T20:01:44.4243458Z Get:3 http://azure.archive.ubuntu.com/ubuntu bionic-backports InRelease [74.6 kB]
2020-05-12T20:01:44.4267343Z Get:4 http://security.ubuntu.com/ubuntu bionic-security InRelease [88.7 kB]
2020-05-12T20:01:44.4402498Z Hit:5 https://storage.googleapis.com/bazel-apt stable InRelease
2020-05-12T20:01:44.4528870Z Get:7 http://dl.google.com/linux/chrome/deb stable InRelease [1811 B]
2020-05-12T20:01:44.4531648Z Get:8 http://packages.cloud.google.com/apt cloud-sdk InRelease [6343 B]
2020-05-12T20:01:44.4625693Z Ign:9 https://repo.mongodb.org/apt/ubuntu bionic/mongodb-org/4.2 InRelease
2020-05-12T20:01:44.4628166Z Get:10 https://download.mono-project.com/repo/ubuntu stable-bionic InRelease [5143 B]
2020-05-12T20:01:44.4689306Z Hit:11 https://dl.yarnpkg.com/debian stable InRelease
2020-05-12T20:01:44.4728603Z Hit:12 https://packages.microsoft.com/repos/azure-cli bionic InRelease
2020-05-12T20:01:44.4730404Z Hit:13 https://repo.mongodb.org/apt/ubuntu bionic/mongodb-org/4.2 Release
2020-05-12T20:01:44.4791325Z Get:14 https://packages.microsoft.com/ubuntu/18.04/prod bionic InRelease [4003 B]
2020-05-12T20:01:44.4953460Z Get:15 https://cli-assets.heroku.com/apt ./ InRelease [2879 B]
2020-05-12T20:01:44.5398536Z Get:16 http://ppa.launchpad.net/ansible/ansible/ubuntu bionic InRelease [15.9 kB]
2020-05-12T20:01:44.5537672Z Get:6 https://packages.cloud.google.com/apt kubernetes-xenial InRelease [8993 B]
2020-05-12T20:01:44.5623352Z Get:17 http://download.opensuse.org/repositories/devel:/kubic:/libcontainers:/stable/xUbuntu_18.04  InRelease [1613 B]
2020-05-12T20:01:44.7250434Z Ign:19 https://dl.bintray.com/sbt/debian  InRelease
2020-05-12T20:01:44.7764780Z Hit:20 http://ppa.launchpad.net/apt-fast/stable/ubuntu bionic InRelease
2020-05-12T20:01:44.8085046Z Get:21 https://dl.bintray.com/sbt/debian  Release [815 B]
2020-05-12T20:01:44.9224893Z Get:18 https://packagecloud.io/github/git-lfs/ubuntu bionic InRelease [23.2 kB]
2020-05-12T20:01:44.9351134Z Hit:22 http://ppa.launchpad.net/git-core/ppa/ubuntu bionic InRelease
2020-05-12T20:01:44.9584688Z Get:23 http://azure.archive.ubuntu.com/ubuntu bionic-updates/main amd64 Packages [932 kB]
2020-05-12T20:01:44.9995850Z Get:24 http://azure.archive.ubuntu.com/ubuntu bionic-updates/main Translation-en [318 kB]
2020-05-12T20:01:45.0041210Z Get:25 http://azure.archive.ubuntu.com/ubuntu bionic-updates/restricted amd64 Packages [50.1 kB]
2020-05-12T20:01:45.0055661Z Get:26 http://azure.archive.ubuntu.com/ubuntu bionic-updates/universe amd64 Packages [1068 kB]
2020-05-12T20:01:45.0260653Z Get:27 http://azure.archive.ubuntu.com/ubuntu bionic-updates/multiverse amd64 Packages [15.5 kB]
2020-05-12T20:01:45.0972830Z Hit:28 http://ppa.launchpad.net/hvr/ghc/ubuntu bionic InRelease
2020-05-12T20:01:45.0985647Z Get:29 http://azure.archive.ubuntu.com/ubuntu bionic-backports/universe amd64 Packages [7484 B]
2020-05-12T20:01:45.0996847Z Get:30 http://azure.archive.ubuntu.com/ubuntu bionic-backports/universe Translation-en [4436 B]
2020-05-12T20:01:45.2521420Z Get:31 http://ppa.launchpad.net/ondrej/php/ubuntu bionic InRelease [20.8 kB]
2020-05-12T20:01:45.3603537Z Get:32 http://dl.google.com/linux/chrome/deb stable/main amd64 Packages [1127 B]
2020-05-12T20:01:45.4125533Z Get:33 http://packages.cloud.google.com/apt cloud-sdk/main amd64 Packages [108 kB]
2020-05-12T20:01:45.5034572Z Hit:34 http://ppa.launchpad.net/ubuntu-toolchain-r/test/ubuntu bionic InRelease
2020-05-12T20:01:45.5165989Z Get:35 https://download.mono-project.com/repo/ubuntu stable-bionic/main amd64 Packages [48.8 kB]
2020-05-12T20:01:45.9672100Z Get:37 https://packages.microsoft.com/ubuntu/18.04/prod bionic/main amd64 Packages [109 kB]
2020-05-12T20:01:45.9680832Z Err:37 https://packages.microsoft.com/ubuntu/18.04/prod bionic/main amd64 Packages
2020-05-12T20:01:45.9681437Z   File has unexpected size (109105 != 109187). Mirror sync in progress? [IP: 13.82.67.141 443]
2020-05-12T20:01:45.9681872Z   Hashes of expected file:
2020-05-12T20:01:45.9685521Z    - Filesize:109187 [weak]
2020-05-12T20:01:45.9686328Z    - SHA512:9e82c821ce6043bc794410d8b0a63519edd3e10c1d0d6c849806f41bf86a947a1ba2a40792e4353139c8136b792cbdcbeed8e2a014467b352f1f87103660cd0b
2020-05-12T20:01:45.9686986Z    - SHA256:f356ce60acc338725547662f7287aea5869694346b1e771d72c1e46c597dcd2e
2020-05-12T20:01:45.9694276Z    - SHA1:c03c811a4c41e5ec100a81318447efe189afe77a [weak]
2020-05-12T20:01:45.9697208Z    - MD5Sum:0aee536e96cdafd7b2e765abee4d34e1 [weak]
2020-05-12T20:01:45.9697407Z   Release file created at: Tue, 12 May 2020 16:41:42 +0000
2020-05-12T20:01:46.0964108Z Get:38 http://security.ubuntu.com/ubuntu bionic-security/main amd64 Packages [709 kB]
2020-05-12T20:01:46.1729649Z Get:39 http://security.ubuntu.com/ubuntu bionic-security/main Translation-en [225 kB]
2020-05-12T20:01:46.1730504Z Get:40 http://security.ubuntu.com/ubuntu bionic-security/universe amd64 Packages [662 kB]
2020-05-12T20:01:46.1864114Z Get:41 http://security.ubuntu.com/ubuntu bionic-security/universe Translation-en [220 kB]
2020-05-12T20:01:46.1904038Z Get:42 http://security.ubuntu.com/ubuntu bionic-security/multiverse amd64 Packages [7392 B]
2020-05-12T20:01:46.2266319Z Get:43 https://cli-assets.heroku.com/apt ./ Packages [624 B]
2020-05-12T20:01:46.3263499Z Get:44 https://packages.cloud.google.com/apt kubernetes-xenial/main amd64 Packages [35.5 kB]
2020-05-12T20:01:46.5086747Z Get:45 http://download.opensuse.org/repositories/devel:/kubic:/libcontainers:/stable/xUbuntu_18.04  Packages [4021 B]
2020-05-12T20:01:46.6756326Z Get:46 http://ppa.launchpad.net/ansible/ansible/ubuntu bionic/main amd64 Packages [688 B]
2020-05-12T20:01:47.3213866Z Get:49 http://ppa.launchpad.net/ondrej/php/ubuntu bionic/main amd64 Packages [52.1 kB]
2020-05-12T20:01:47.3219838Z Get:48 https://packagecloud.io/github/git-lfs/ubuntu bionic/main amd64 Packages [3423 B]
2020-05-12T20:01:54.2835994Z Fetched 4818 kB in 3s (1533 kB/s)
2020-05-12T20:01:55.4257381Z Reading package lists...
2020-05-12T20:01:55.4691063Z E: Failed to fetch https://packages.microsoft.com/ubuntu/18.04/prod/dists/bionic/main/binary-amd64/Packages.bz2  File has unexpected size (109105 != 109187). Mirror sync in progress? [IP: 13.82.67.141 443]
2020-05-12T20:01:55.4691867Z    Hashes of expected file:
2020-05-12T20:01:55.4692433Z     - Filesize:109187 [weak]
2020-05-12T20:01:55.4693197Z     - SHA512:9e82c821ce6043bc794410d8b0a63519edd3e10c1d0d6c849806f41bf86a947a1ba2a40792e4353139c8136b792cbdcbeed8e2a014467b352f1f87103660cd0b
2020-05-12T20:01:55.4693944Z     - SHA256:f356ce60acc338725547662f7287aea5869694346b1e771d72c1e46c597dcd2e
2020-05-12T20:01:55.4694528Z     - SHA1:c03c811a4c41e5ec100a81318447efe189afe77a [weak]
2020-05-12T20:01:55.4695103Z     - MD5Sum:0aee536e96cdafd7b2e765abee4d34e1 [weak]
2020-05-12T20:01:55.4695493Z    Release file created at: Tue, 12 May 2020 16:41:42 +0000
2020-05-12T20:01:55.4695955Z E: Some index files failed to download. They have been ignored, or old ones used instead.
2020-05-12T20:01:55.4732909Z ##[error]The process '/usr/bin/sudo' failed with exit code 100
2020-05-12T20:01:55.4815875Z ##[group]Run actions/upload-artifact@master
2020-05-12T20:01:55.4816003Z with:
2020-05-12T20:01:55.4816108Z   name: qawolf
2020-05-12T20:01:55.4816217Z   path: /home/runner/work/jperl-tests/jperl-tests/artifacts
2020-05-12T20:01:55.4816314Z ##[endgroup]
2020-05-12T20:01:55.5429981Z ##[warning]No files were found for the provided path: /home/runner/work/jperl-tests/jperl-tests/artifacts. No artifacts will be uploaded.
2020-05-12T20:01:55.5503828Z Post job cleanup.
2020-05-12T20:01:55.6696359Z [command]/usr/bin/git version
2020-05-12T20:01:55.6755257Z git version 2.26.2
2020-05-12T20:01:55.6791493Z [command]/usr/bin/git config --local --name-only --get-regexp core\.sshCommand
2020-05-12T20:01:55.6844826Z [command]/usr/bin/git submodule foreach --recursive git config --local --name-only --get-regexp 'core\.sshCommand' && git config --local --unset-all 'core.sshCommand' || :
2020-05-12T20:01:55.7132640Z [command]/usr/bin/git config --local --name-only --get-regexp http\.https\:\/\/github\.com\/\.extraheader
2020-05-12T20:01:55.7178105Z http.https://github.com/.extraheader
2020-05-12T20:01:55.7187293Z [command]/usr/bin/git config --local --unset-all http.https://github.com/.extraheader
2020-05-12T20:01:55.7241629Z [command]/usr/bin/git submodule foreach --recursive git config --local --name-only --get-regexp 'http\.https\:\/\/github\.com\/\.extraheader' && git config --local --unset-all 'http.https://github.com/.extraheader' || :
2020-05-12T20:01:55.7592144Z Cleaning up orphan processes

JavaScript not executing

Hi, I'm sorry to open a PR without much details but I don't know where to look anymore.

The tests in this PR keep failing because JS seems to not run at all, while when I run them locally they execute just fine (1 of them is failing but it's unrelated).

floating-ui/floating-ui#990

Do you have any hint?

Failed to fetch package, file has unexpected size (11635 != 11530)

Run microsoft/playwright-github-action@v1
/usr/bin/sudo apt-get update
Hit:1 http://azure.archive.ubuntu.com/ubuntu bionic InRelease
.......
Failed to fetch https://packages.microsoft.com/repos/azure-cli/dists/bionic/main/binary-amd64/Packages.bz2  File has unexpected size (11635 != 11530)

I think the size is big because of sudo apt-get update command

Canvases using WebGL not loading

Hi there,

We love playwright and think you've done a great job so thanks very much for that!

  • We've found that with headless: false we are not getting WebGl through, a 3rd party canvas library throws the error Error: WebGL unsupported in this browser.
  • Further recorded via video recording.
  • It all works fine locally, however.

Is there anyway to workaround this issue?

Github action run command

xvfb-run yarn --cwd ui e2e

package.json

{
   ...,
   "scripts": {
      "e2e": "jest --config ./e2e/jest.config.js",
   },
   ...,
}

Spec file

browser = await chromium.launch({
      headless: false,
});
context = await browser.newContext({
bypassCSP: true,
recordHar: {
  path: '/tmp/e2e-har-recordings',
},
recordVideo: {
  dir: '/tmp/e2e-video-recordings',
},
});
page = await context.newPage();

Conflicting package lists using playwright-github-action@v1

I have a workflow that looks like this:

jobs:
  e2e:
    runs-on: ubuntu-latest
    strategy:
      matrix:
        node-version: [14.x, 16.x]
    steps:
      - uses: actions/checkout@v2
      - uses: pnpm/[email protected]
        with:
          version: 6.23.5
      - uses: actions/setup-python@v2
        with:
          python-version: '3.x'
      - uses: actions/[email protected]
        with:
          node-version: ${{ matrix.node-version }}
          cache: 'pnpm'
      - uses: docker/setup-buildx-action@v1
      - uses: microsoft/playwright-github-action@v1
      - name: Start microservices and run e2e tests
        run: |
          pnpm install
          pnpm services:start
          pnpm jest:e2e

It's suddenly started failing like this:

Run microsoft/playwright-github-action@v1
/usr/bin/sudo apt-get update
Hit:1 http://azure.archive.ubuntu.com/ubuntu focal InRelease
Get:2 http://azure.archive.ubuntu.com/ubuntu focal-updates InRelease [114 kB]
Get:3 http://azure.archive.ubuntu.com/ubuntu focal-backports InRelease [108 kB]
Get:4 http://security.ubuntu.com/ubuntu focal-security InRelease [114 kB]
Get:5 https://packages.microsoft.com/ubuntu/20.04/prod focal InRelease [10.5 kB]
Hit:6 http://ppa.launchpad.net/ubuntu-toolchain-r/test/ubuntu focal InRelease
Get:[7](https://github.com/Seneca-CDOT/telescope/runs/5560042499?check_suite_focus=true#step:6:7) http://azure.archive.ubuntu.com/ubuntu focal-updates/main amd64 Packages [1642 kB]
Get:[8](https://github.com/Seneca-CDOT/telescope/runs/5560042499?check_suite_focus=true#step:6:8) http://azure.archive.ubuntu.com/ubuntu focal-updates/main Translation-en [312 kB]
Get:[9](https://github.com/Seneca-CDOT/telescope/runs/5560042499?check_suite_focus=true#step:6:9) http://azure.archive.ubuntu.com/ubuntu focal-updates/main amd64 c-n-f Metadata [14.8 kB]
Get:10 http://azure.archive.ubuntu.com/ubuntu focal-updates/restricted amd64 Packages [853 kB]
Get:11 http://azure.archive.ubuntu.com/ubuntu focal-updates/restricted Translation-en [122 kB]
Get:12 http://azure.archive.ubuntu.com/ubuntu focal-updates/universe amd64 Packages [910 kB]
Get:13 http://azure.archive.ubuntu.com/ubuntu focal-updates/universe Translation-en [202 kB]
Get:14 http://azure.archive.ubuntu.com/ubuntu focal-updates/universe amd64 c-n-f Metadata [20.3 kB]
Get:15 http://azure.archive.ubuntu.com/ubuntu focal-updates/multiverse amd64 Packages [23.8 kB]
Get:16 http://azure.archive.ubuntu.com/ubuntu focal-updates/multiverse amd64 c-n-f Metadata [580 B]
Get:17 http://azure.archive.ubuntu.com/ubuntu focal-backports/main amd64 Packages [42.2 kB]
Get:18 http://azure.archive.ubuntu.com/ubuntu focal-backports/main Translation-en [10.1 kB]
Get:19 http://azure.archive.ubuntu.com/ubuntu focal-backports/universe amd64 Packages [22.7 kB]
Get:20 http://azure.archive.ubuntu.com/ubuntu focal-backports/universe Translation-en [15.4 kB]
Get:21 http://azure.archive.ubuntu.com/ubuntu focal-backports/universe amd64 c-n-f Metadata [804 B]
Get:22 http://security.ubuntu.com/ubuntu focal-security/main amd64 Packages [1317 kB]
Get:23 http://security.ubuntu.com/ubuntu focal-security/main Translation-en [231 kB]
Get:24 http://security.ubuntu.com/ubuntu focal-security/main amd64 c-n-f Metadata [9808 B]
Get:25 http://security.ubuntu.com/ubuntu focal-security/restricted amd64 Packages [799 kB]
Get:26 http://security.ubuntu.com/ubuntu focal-security/restricted Translation-en [114 kB]
Get:27 http://security.ubuntu.com/ubuntu focal-security/universe amd64 Packages [692 kB]
Get:28 http://security.ubuntu.com/ubuntu focal-security/universe Translation-en [121 kB]
Get:29 http://security.ubuntu.com/ubuntu focal-security/universe amd64 c-n-f Metadata [14.0 kB]
Reading package lists...
W: Conflicting distribution: https://packages.microsoft.com/ubuntu/20.04/prod focal InRelease (expected focal but got testing)
E: Repository 'https://packages.microsoft.com/ubuntu/20.04/prod focal InRelease' changed its 'Origin' value from 'microsoft-ubuntu-focal-prod focal' to 'microsoft-ubuntu-focal-prod testing'
E: Repository 'https://packages.microsoft.com/ubuntu/20.04/prod focal InRelease' changed its 'Label' value from 'microsoft-ubuntu-focal-prod focal' to 'microsoft-ubuntu-focal-prod testing'
E: Repository 'https://packages.microsoft.com/ubuntu/20.04/prod focal InRelease' changed its 'Codename' value from 'focal' to 'testing'
Error: The process '/usr/bin/sudo' failed with exit code [10](https://github.com/Seneca-CDOT/telescope/runs/5560042499?check_suite_focus=true#step:6:10)0

I wonder if there's something different I need to do, version-wise, or if this is a blip that will self-correct, or a bug that needs attention.

Thanks for any tips.

Error with lerna bootstrap

There seems to be some odd interaction between the lerna bootstrap command and playwright-github-action. A majority of the time, if we run lerna bootstrap after playwright-github-action, we encounter the following error:

> node install.js


lerna ERR! npm ci stderr:

(node:7990) UnhandledPromiseRejectionWarning: Error: ENOENT: no such file or directory, chmod '/home/runner/.cache/ms-playwright/chromium-792639/chrome-linux/chrome'
(Use `node --trace-warnings ...` to show where the warning was created)
(node:7990) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). To terminate the node process on unhandled promise rejection, use the CLI flag `--unhandled-rejections=strict` (see https://nodejs.org/api/cli.html#cli_unhandled_rejections_mode). (rejection id: 1)
(node:7990) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code.
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! [email protected] install: `node install.js`
npm ERR! Exit status 1
npm ERR! 
npm ERR! Failed at the [email protected] install script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

We are using this GitHub Actions config:

name: Tests

on: [push, pull_request]

jobs:
  tests:
    runs-on: ubuntu-latest

    steps:
      - uses: actions/checkout@v2

      - uses: actions/setup-node@v1
        with:
          node-version: 14

      - uses: microsoft/playwright-github-action@v1

      - name: NPM install
        run: npm ci

      - name: Lerna bootstrap
        run: npm run bootstrap

      - name: Build
        run: npm run build

      - name: Test
        run: npm run test

Running playwright-github-action after lerna bootstrap seems to work fine. No idea whether the source of this error is this action, Lerna, or somewhere else.

Error with missing libraries

We often, but inconsistently, see errors from Playwright about missing libraries after playwright-github-actions has run, such as libmozsqlite3.so and libxul.so. So far I have only seen it affect Firefox. Example:

 ❌ Error: browserType.launch: Host system is missing dependencies!  (failed on Firefox)
      
      Missing libraries are:
      libmozsqlite3.so
      
      Note: use DEBUG=pw:api environment variable and rerun to capture Playwright logs.
      at validateDependenciesLinux (/home/runner/work/lit-html/lit-html/packages/lit-html/node_modules/playwright/lib/server/validateDependencies.js:131:11)
      at async validateDependencies (/home/runner/work/lit-html/lit-html/packages/lit-html/node_modules/playwright/lib/server/validateDependencies.js:45:16)
      at async Object.validateHostRequirements (/home/runner/work/lit-html/lit-html/packages/lit-html/node_modules/playwright/lib/server/validateDependencies.js:34:5)
      at async Firefox._launchServer (/home/runner/work/lit-html/lit-html/packages/lit-html/node_modules/playwright/lib/server/browserType.js:154:13)
      at async Firefox._innerLaunch (/home/runner/work/lit-html/lit-html/packages/lit-html/node_modules/playwright/lib/server/browserType.js:76:61)
      at async ProgressController.run (/home/runner/work/lit-html/lit-html/packages/lit-html/node_modules/playwright/lib/progress.js:75:28)
      at async Firefox.launch (/home/runner/work/lit-html/lit-html/packages/lit-html/node_modules/playwright/lib/server/browserType.js:62:25)

We are using this GitHub Actions config:

name: Tests

on: [push, pull_request]

jobs:
  tests:
    runs-on: ubuntu-latest

    steps:
      - uses: actions/checkout@v2

      - uses: actions/setup-node@v1
        with:
          node-version: 14

      - uses: microsoft/playwright-github-action@v1

      - name: NPM install
        run: npm ci

      - name: Lerna bootstrap
        run: npm run bootstrap

      - name: Build
        run: npm run build

      - name: Test
        run: npm run test

Stuck at installing packages when trying to run tests using github actions

When using GitHub Actions and using our custom runner, it is stuck because of -

After this operation, 643 MB of additional disk space will be used.
Do you want to continue? [Y/n] 

Details :
The following NEW packages will be installed:

adwaita-icon-theme dictionaries-common emacsen-common fontconfig
fontconfig-config fonts-dejavu-core gstreamer1.0-libav
gstreamer1.0-plugins-bad gstreamer1.0-plugins-base gstreamer1.0-plugins-good
gtk-update-icon-cache hicolor-icon-theme humanity-icon-theme hunspell-en-us
libaa1 libaom0 libasound2 libasound2-data libaspell15 libass9 libasyncns0
libatk-bridge2.0-0 libatk1.0-0 libatk1.0-data libatspi2.0-0 libavahi-client3
libavahi-common-data libavahi-common3 libavc1394-0 libavcodec58 libavfilter7
libavformat58 libavutil56 libbluray2 libbs2b0 libcaca0 libcairo-gobject2
libcairo2 libcdparanoia0 libchromaprint1 libcodec2-0.9 libcolord2 libcups2
libdatrie1 libdbus-glib-1-2 libdc1394-22 libdca0 libde265-0 libdrm-amdgpu1
libdrm-common libdrm-intel1 libdrm-nouveau2 libdrm-radeon1 libdrm2 libdv4
libdvdnav4 libdvdread7 libegl-mesa0 libegl1 libenchant1c2a libepoxy0
libfaad2 libfftw3-double3 libflac8 libflite1 libfluidsynth2 libfontconfig1
libfreetype6 libfribidi0 libgbm1 libgdk-pixbuf2.0-0 libgdk-pixbuf2.0-common
libgl1 libgl1-mesa-dri libglapi-mesa libgles2 libglvnd0 libglx-mesa0 libglx0
libgme0 libgpm2 libgraphite2-3 libgsm1 libgssdp-1.2-0 libgstreamer-gl1.0-0
libgstreamer-plugins-bad1.0-0 libgstreamer-plugins-base1.0-0
libgstreamer-plugins-good1.0-0 libgtk-3-0 libgtk-3-common libgtk2.0-0
libgtk2.0-common libgudev-1.0-0 libgupnp-1.2-0 libgupnp-igd-1.0-4
libharfbuzz-icu0 libharfbuzz0b libhunspell-1.7-0 libhyphen0 libice6
libiec61883-0 libilmbase24 libinstpatch-1.0-2 libjack-jackd2-0 libjbig0
libjpeg-turbo8 libjpeg8 libjson-glib-1.0-0 libjson-glib-1.0-common libkate1
liblcms2-2 liblilv-0-0 libllvm11 libmjpegutils-2.1-0 libmms0 libmodplug1
libmp3lame0 libmpcdec6 libmpeg2encpp-2.1-0 libmpg123-0 libmplex2-2.1-0
libmysofa1 libnice10 libnorm1 libnotify4 libnspr4 libnss3 libofa0 libogg0
libopenal-data libopenal1 libopenexr24 libopenjp2-7 libopenmpt0 libopus0
liborc-0.4-0 libpango-1.0-0 libpangocairo-1.0-0 libpangoft2-1.0-0
libpciaccess0 libpgm-5.2-0 libpixman-1-0 libpng16-16 libpostproc55 libpulse0
libraw1394-11 librest-0.7-0 librsvg2-2 librsvg2-common librubberband2
libsamplerate0 libsbc1 libsdl2-2.0-0 libsecret-1-0 libsecret-common
libserd-0-0 libshine3 libshout3 libslang2 libsm6 libsnappy1v5 libsndfile1
libsndio7.0 libsodium23 libsord-0-0 libsoundtouch1 libsoup-gnome2.4-1
libsoxr0 libspandsp2 libspeex1 libsratom-0-0 libsrt1 libsrtp2-1
libssh-gcrypt-4 libswresample3 libswscale5 libtag1v5 libtag1v5-vanilla
libtext-iconv-perl libthai-data libthai0 libtheora0 libtiff5 libtwolame0
libusb-1.0-0 libusrsctp1 libv4l-0 libv4lconvert0 libva-drm2 libva-x11-2
libva2 libvdpau1 libvidstab1.1 libvisual-0.4-0 libvo-aacenc0 libvo-amrwbenc0
libvorbis0a libvorbisenc2 libvorbisfile3 libvpx6 libvulkan1 libwavpack1
libwayland-client0 libwayland-cursor0 libwayland-egl1 libwayland-server0
libwebp6 libwebpdemux2 libwebpmux3 libwebrtc-audio-processing1 libwildmidi2
libwoff1 libwrap0 libx11-6 libx11-data libx11-xcb1 libx264-155 libx265-179
libxau6 libxcb-dri2-0 libxcb-dri3-0 libxcb-glx0 libxcb-present0
libxcb-render0 libxcb-shm0 libxcb-sync1 libxcb-xfixes0 libxcb1
libxcomposite1 libxcursor1 libxdamage1 libxdmcp6 libxext6 libxfixes3 libxi6
libxinerama1 libxkbcommon0 libxrandr2 libxrender1 libxshmfence1 libxslt1.1
libxss1 libxt6 libxtst6 libxvidcore4 libxxf86vm1 libzbar0 libzmq5
libzvbi-common libzvbi0 ocl-icd-libopencl1 timgm6mb-soundfont ubuntu-mono
x11-common xkb-data
0 upgraded, 255 newly installed, 0 to remove and 15 not upgraded.
Need to get 107 MB of archives.
After this operation, 643 MB of additional disk space will be used.
Do you want to continue? [Y/n] 

How can I bypass this or continue from here ?
This is how we have it to use GitHub Actions

runs-on: custom-runner-xyz
    steps:
      - uses: actions/checkout@v2
      
      - uses: actions/setup-node@v1

      - uses: microsoft/playwright-github-action@v2

How can I proceed further and let the installation continue ?

Caching browser binaries

GHA caching docs recommend caching the NPM / Yarn cache (~/.npm / yarn cache dir), which does not have browser binaries. This means that the binaries are downloaded on every CI execution, which can be optimized. With the @actions/tool-cache package, this Action can potentially implement caching for binaries.

What this could look like:

  • Define the PLAYWRIGHT_BROWSERS_PATH environment variable to specify a fixed location for the binaries to be downloaded
  • Cache this location with tc.cacheDir(dir, 'playwright-browsers', playwrightVersion) (docs)
  • Restore at the same location with tc.find (docs)
  • This would require defining runs.post in the action.yml, like the actions/cache does it here. However, this bit is not documented in the metadata syntax reference for GHA (is it for some whitelisted actions only?)
    • Verified with #11 that runs.post will work

Alternatively, we could achieve caching in user-land by reusing the cache action (this could be an MVP implementation):

  • Set the PLAYWRIGHT_BROWSERS_PATH to a certain path, and use the same path with the cache action
  • Use the cache action in the workflow (this will end up being duplicated, since users will have a caching action for npm/yarn already)
- name: Cache browsers
  id: cache-browsers
  uses: actions/cache@v1
  with:
    path: <same as PLAYWRIGHT_BROWSERS_PATH>
    key: key: ${{ runner.os }}-${{ hashFiles('package.json') }}

Installing packages freezes in a self-hosted runner

Hi,

I'm trying to run end-to-end tests using Playwright on a self-hosted Ubuntu 18.04 runner. However, this action hangs when installing packages via APT (see output below) since it's waiting for the user to press Y.

It seems this is caused by missing -y flag in command /usr/bin/sudo apt-get install --no-install-recommends .... Should it be appended to the command?

Run microsoft/playwright-github-action@v1
/usr/bin/sudo apt-get update
Hit:1 http://azure.archive.ubuntu.com/ubuntu bionic InRelease
Get:2 http://azure.archive.ubuntu.com/ubuntu bionic-updates InRelease [88.7 kB]
Get:3 http://azure.archive.ubuntu.com/ubuntu bionic-backports InRelease [74.6 kB]
Hit:4 http://security.ubuntu.com/ubuntu bionic-security InRelease
Fetched 163 kB in 1s (247 kB/s)
Reading package lists...
/usr/bin/sudo apt-get install --no-install-recommends libasound2 libatk-bridge2.0-0 libatk1.0-0 libatspi2.0-0 libcairo2 libcups2 libdbus-1-3 libdrm2 libgbm1 libgdk-pixbuf2.0-0 libglib2.0-0 libgtk-3-0 libnspr4 libnss3 libpango-1.0-0 libpangocairo-1.0-0 libx11-6 libx11-xcb1 libxcb-dri3-0 libxcb1 libxcomposite1 libxdamage1 libxext6 libxfixes3 libxi6 libxrandr2 libxtst6 libatk1.0-0 libcairo-gobject2 libcairo2 libdbus-1-3 libdbus-glib-1-2 libfontconfig1 libfreetype6 libgdk-pixbuf2.0-0 libglib2.0-0 libgtk-3-0 libgtk2.0-0 libpango-1.0-0 libpangocairo-1.0-0 libpangoft2-1.0-0 libx11-6 libx11-xcb1 libxcb-shm0 libxcb1 libxcomposite1 libxcursor1 libxdamage1 libxext6 libxfixes3 libxi6 libxrender1 libxt6 gstreamer1.0-libav gstreamer1.0-plugins-bad gstreamer1.0-plugins-base gstreamer1.0-plugins-good libatk-bridge2.0-0 libatk1.0-0 libbrotli1 libcairo2 libegl1 libenchant1c2a libepoxy0 libfontconfig1 libfreetype6 libgdk-pixbuf2.0-0 libgl1 libgles2 libglib2.0-0 libgstreamer-gl1.0-0 libgstreamer1.0-0 libgtk-3-0 libharfbuzz-icu0 libharfbuzz0b libhyphen0 libicu60 libjpeg-turbo8 libnotify4 libopenjp2-7 libopus0 libpango-1.0-0 libpng16-16 libsecret-1-0 libvpx5 libwayland-client0 libwayland-egl1 libwayland-server0 libwebp6 libwebpdemux2 libwoff1 libx11-6 libxcomposite1 libxdamage1 libxkbcommon0 libxml2 libxslt1.1
Reading package lists...
Building dependency tree...
Reading state information...
libxext6 is already the newest version (2:1.3.3-1).
libxext6 set to manually installed.
libcups2 is already the newest version (2.2.7-1ubuntu2.8).
libdbus-1-3 is already the newest version (1.12.2-1ubuntu1.2).
libdbus-1-3 set to manually installed.
libdrm2 is already the newest version (2.4.101-2~18.04.1).
libdrm2 set to manually installed.
libfreetype6 is already the newest version (2.8.1-2ubuntu2.1).
libfreetype6 set to manually installed.
libglib2.0-0 is already the newest version (2.56.4-0ubuntu0.18.04.6).
libglib2.0-0 set to manually installed.
libicu60 is already the newest version (60.2-3ubuntu3.1).
libicu60 set to manually installed.
libpng16-16 is already the newest version (1.6.34-1ubuntu0.18.04.2).
libpng16-16 set to manually installed.
libx11-6 is already the newest version (2:1.6.4-3ubuntu0.3).
libx11-6 set to manually installed.
libxcb1 is already the newest version (1.13-2~ubuntu18.04).
libxcb1 set to manually installed.
libxml2 is already the newest version (2.9.4+dfsg1-6.1ubuntu1.3).
libxml2 set to manually installed.
libxslt1.1 is already the newest version (1.1.29-5ubuntu0.2).
libxslt1.1 set to manually installed.
The following package was automatically installed and is no longer required:
  linux-headers-4.15.0-124
Use 'sudo apt autoremove' to remove it.
The following additional packages will be installed:
  adwaita-icon-theme aspell aspell-en dconf-gsettings-backend dconf-service
  dictionaries-common emacsen-common fontconfig fontconfig-config
  fonts-dejavu-core glib-networking glib-networking-common
  glib-networking-services gsettings-desktop-schemas gtk-update-icon-cache
  hicolor-icon-theme humanity-icon-theme libaa1 libasound2-data libaspell15
  libass9 libasyncns0 libatk1.0-data libavc1394-0 libavcodec57 libavfilter6
  libavformat57 libavresample3 libavutil55 libbluray2 libbs2b0 libcaca0
  libcdparanoia0 libchromaprint1 libcolord2 libcroco3 libcrystalhd3 libdatrie1
  libdc1394-22 libdca0 libdconf1 libde265-0 libdrm-amdgpu1 libdrm-intel1
  libdrm-nouveau2 libdrm-radeon1 libdv4 libdvdnav4 libdvdread4 libegl-mesa0
  libfaad2 libfftw3-double3 libflac8 libflite1 libfluidsynth1
  libgdk-pixbuf2.0-common libgl1-mesa-dri libglapi-mesa libglvnd0 libglx-mesa0
  libglx0 libgme0 libgomp1 libgraphite2-3 libgsm1 libgssdp-1.0-3
  libgstreamer-plugins-bad1.0-0 libgstreamer-plugins-base1.0-0
  libgstreamer-plugins-good1.0-0 libgtk-3-common libgtk2.0-common
  libgudev-1.0-0 libgupnp-1.0-4 libgupnp-igd-1.0-4 libhunspell-1.6-0 libice6
  libiec61883-0 libilmbase12 libjack-jackd2-0 libjbig0 libjpeg8
  libjson-glib-1.0-0 libjson-glib-1.0-common libkate1 liblcms2-2 liblilv-0-0
  libllvm10 libmjpegutils-2.1-0 libmms0 libmodplug1 libmp3lame0 libmpcdec6
  libmpeg2encpp-2.1-0 libmpg123-0 libmplex2-2.1-0 libmysofa0 libnice10
  libnorm1 libofa0 libogg0 libopenal-data libopenal1 libopenexr22 libopenmpt0
  liborc-0.4-0 libpciaccess0 libpgm-5.2-0 libpixman-1-0 libpostproc54
  libproxy1v5 libpulse0 libraw1394-11 librest-0.7-0 librsvg2-2 librsvg2-common
  librubberband2 libsamplerate0 libsbc1 libsecret-common libsensors4
  libserd-0-0 libshine3 libshout3 libsm6 libsnappy1v5 libsndfile1 libsndio6.1
  libsodium23 libsord-0-0 libsoundtouch1 libsoup-gnome2.4-1 libsoup2.4-1
  libsoxr0 libspandsp2 libspeex1 libsratom-0-0 libsrtp2-1 libssh-gcrypt-4
  libswresample2 libswscale4 libtag1v5 libtag1v5-vanilla libthai-data libthai0
  libtheora0 libtiff5 libtwolame0 libv4l-0 libv4lconvert0 libva-drm2
  libva-x11-2 libva2 libvdpau1 libvisual-0.4-0 libvo-aacenc0 libvo-amrwbenc0
  libvorbis0a libvorbisenc2 libvorbisfile3 libvulkan1 libwavpack1
  libwayland-cursor0 libwebpmux3 libwebrtc-audio-processing1
  libwildmidi-config libwildmidi2 libx264-152 libx265-146 libxcb-dri2-0
  libxcb-glx0 libxcb-present0 libxcb-render0 libxcb-sync1 libxcb-xfixes0
  libxinerama1 libxshmfence1 libxvidcore4 libxxf86vm1 libzbar0 libzmq5
  libzvbi-common libzvbi0 ubuntu-mono x11-common
Suggested packages:
  aspell-doc spellutils wordlist frei0r-plugins gvfs libasound2-plugins
  alsa-utils libbluray-bdj colord firmware-crystalhd libdv-bin oss-compat
  libdvdcss2 libenchant-voikko libfftw3-bin libfftw3-dev
  fluidr3mono-gm-soundfont | timgm6mb-soundfont | fluid-soundfont-gm
  libvisual-0.4-plugins gstreamer1.0-tools jackd2 liblcms2-utils libportaudio2
  opus-tools pulseaudio libraw1394-doc librsvg2-bin lm-sensors serdi sndiod
  sordi speex
Recommended packages:
  gstreamer1.0-x at-spi2-core libaacs0 enchant libgdk-pixbuf2.0-bin
  gstreamer1.0-gl libgtk-3-bin libgail-common libgtk2.0-bin hunspell-en-us
  | hunspell-dictionary | myspell-dictionary notification-daemon va-driver-all
  | va-driver vdpau-driver-all | vdpau-driver freepats
The following NEW packages will be installed:
  adwaita-icon-theme aspell aspell-en dconf-gsettings-backend dconf-service
  dictionaries-common emacsen-common fontconfig fontconfig-config
  fonts-dejavu-core glib-networking glib-networking-common
  glib-networking-services gsettings-desktop-schemas gstreamer1.0-libav
  gstreamer1.0-plugins-bad gstreamer1.0-plugins-base gstreamer1.0-plugins-good
  gtk-update-icon-cache hicolor-icon-theme humanity-icon-theme libaa1
  libasound2 libasound2-data libaspell15 libass9 libasyncns0
  libatk-bridge2.0-0 libatk1.0-0 libatk1.0-data libatspi2.0-0 libavc1394-0
  libavcodec57 libavfilter6 libavformat57 libavresample3 libavutil55
  libbluray2 libbrotli1 libbs2b0 libcaca0 libcairo-gobject2 libcairo2
  libcdparanoia0 libchromaprint1 libcolord2 libcroco3 libcrystalhd3 libdatrie1
  libdbus-glib-1-2 libdc1394-22 libdca0 libdconf1 libde265-0 libdrm-amdgpu1
  libdrm-intel1 libdrm-nouveau2 libdrm-radeon1 libdv4 libdvdnav4 libdvdread4
  libegl-mesa0 libegl1 libenchant1c2a libepoxy0 libfaad2 libfftw3-double3
  libflac8 libflite1 libfluidsynth1 libfontconfig1 libgbm1 libgdk-pixbuf2.0-0
  libgdk-pixbuf2.0-common libgl1 libgl1-mesa-dri libglapi-mesa libgles2
  libglvnd0 libglx-mesa0 libglx0 libgme0 libgomp1 libgraphite2-3 libgsm1
  libgssdp-1.0-3 libgstreamer-gl1.0-0 libgstreamer-plugins-bad1.0-0
  libgstreamer-plugins-base1.0-0 libgstreamer-plugins-good1.0-0
  libgstreamer1.0-0 libgtk-3-0 libgtk-3-common libgtk2.0-0 libgtk2.0-common
  libgudev-1.0-0 libgupnp-1.0-4 libgupnp-igd-1.0-4 libharfbuzz-icu0
  libharfbuzz0b libhunspell-1.6-0 libhyphen0 libice6 libiec61883-0
  libilmbase12 libjack-jackd2-0 libjbig0 libjpeg-turbo8 libjpeg8
  libjson-glib-1.0-0 libjson-glib-1.0-common libkate1 liblcms2-2 liblilv-0-0
  libllvm10 libmjpegutils-2.1-0 libmms0 libmodplug1 libmp3lame0 libmpcdec6
  libmpeg2encpp-2.1-0 libmpg123-0 libmplex2-2.1-0 libmysofa0 libnice10
  libnorm1 libnotify4 libnspr4 libnss3 libofa0 libogg0 libopenal-data
  libopenal1 libopenexr22 libopenjp2-7 libopenmpt0 libopus0 liborc-0.4-0
  libpango-1.0-0 libpangocairo-1.0-0 libpangoft2-1.0-0 libpciaccess0
  libpgm-5.2-0 libpixman-1-0 libpostproc54 libproxy1v5 libpulse0 libraw1394-11
  librest-0.7-0 librsvg2-2 librsvg2-common librubberband2 libsamplerate0
  libsbc1 libsecret-1-0 libsecret-common libsensors4 libserd-0-0 libshine3
  libshout3 libsm6 libsnappy1v5 libsndfile1 libsndio6.1 libsodium23
  libsord-0-0 libsoundtouch1 libsoup-gnome2.4-1 libsoup2.4-1 libsoxr0
  libspandsp2 libspeex1 libsratom-0-0 libsrtp2-1 libssh-gcrypt-4
  libswresample2 libswscale4 libtag1v5 libtag1v5-vanilla libthai-data libthai0
  libtheora0 libtiff5 libtwolame0 libv4l-0 libv4lconvert0 libva-drm2
  libva-x11-2 libva2 libvdpau1 libvisual-0.4-0 libvo-aacenc0 libvo-amrwbenc0
  libvorbis0a libvorbisenc2 libvorbisfile3 libvpx5 libvulkan1 libwavpack1
  libwayland-client0 libwayland-cursor0 libwayland-egl1 libwayland-server0
  libwebp6 libwebpdemux2 libwebpmux3 libwebrtc-audio-processing1
  libwildmidi-config libwildmidi2 libwoff1 libx11-xcb1 libx264-152 libx265-146
  libxcb-dri2-0 libxcb-dri3-0 libxcb-glx0 libxcb-present0 libxcb-render0
  libxcb-shm0 libxcb-sync1 libxcb-xfixes0 libxcomposite1 libxcursor1
  libxdamage1 libxfixes3 libxi6 libxinerama1 libxkbcommon0 libxrandr2
  libxrender1 libxshmfence1 libxt6 libxtst6 libxvidcore4 libxxf86vm1 libzbar0
  libzmq5 libzvbi-common libzvbi0 ubuntu-mono x11-common
0 upgraded, 241 newly installed, 0 to remove and 25 not upgraded.
Need to get 83.2 MB of archives.
After this operation, 531 MB of additional disk space will be used.
Do you want to continue? [Y/n]

Planning to upgrade logo on GitHub Marketplace to Microsoft logo by end of May 2021

Headful / headed runs failing on GitHub Actions (python-playwright / Chromium / Linux)

I can't get headful runs to work using python-playwright; I keep getting Unable to open X display..

I've tried for months with the recommended setup at https://playwright.dev/python/docs/ci#running-headed, and just today tried adding --server-args="-screen 0 1280x960x24" to the xvfb-run command to match your (passing) example here, but it's still not working.

I got some errors about the Chromium sandbox, so I added

chromium_sandbox=False,
args=["--no-sandbox", "--disable-setuid-sandbox"],

but that didn't seem to help.

Currently on python 3.9.5, python-playwright 1.11.0, Ubuntu-20.04.

You can see my config at: https://github.com/n8henrie/pycookiecheat/blob/dev/.github/workflows/python-package.yml

At the time of opening this issue, it is:

# This workflow will install Python dependencies, run tests and lint with a variety of Python versions
# For more information see: https://help.github.com/actions/language-and-framework-guides/using-python-with-github-actions

name: Python package

on:
  push:
    branches: [ master, dev ]
  pull_request:
    branches: [ master, dev ]

jobs:
  build:
    runs-on: ubuntu-20.04
    strategy:
      matrix:
        python-version: [3.7, 3.8, 3.9]

    steps:
    - uses: actions/checkout@v2
    - name: Set up Python ${{ matrix.python-version }}
      uses: actions/setup-python@v2
      with:
        python-version: ${{ matrix.python-version }}
    - uses: microsoft/playwright-github-action@v1
    - name: Install tox
      run: python -m pip install tox
    - name: Run tox
      run: xvfb-run --auto-servernum --server-args="-screen 0 1280x960x24" -- python -m tox -e py
    - name: Lint
      run: python -m tox -e lint

You can see my dozens of failing attempts to get this to run at: https://github.com/n8henrie/pycookiecheat/actions -- I'd love to hear any suggestions!

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.