Build: Only install Playwright dependencies when needed

PR gh-5190 added support for running tests on Playwright WebKit
in CI. For efficiency reasons, Playwright dependencies are only
installed for the `test:browser` npm script. However, that same
script is also used for Firefox ESR testing.

This change makes Playwright dependencies installed only for cases
where `WebKitHeadless` exists on the list of tested browsers.

Closes gh-5204
Ref gh-5190
This commit is contained in:
Michał Gołębiowski-Owczarek 2023-03-20 17:13:31 +01:00 committed by GitHub
parent ce264e0789
commit e77bd9d64f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -73,7 +73,7 @@ jobs:
- name: Install Playwright dependencies - name: Install Playwright dependencies
run: npx playwright-webkit install-deps run: npx playwright-webkit install-deps
if: "matrix.NPM_SCRIPT == 'test:browser'" if: "matrix.NPM_SCRIPT == 'test:browser' && contains(matrix.BROWSERS, 'WebkitHeadless')"
- name: Run tests - name: Run tests
env: env: