From 8cf978fec64c63cfabe90431df9819af01ab77a2 Mon Sep 17 00:00:00 2001 From: vince-fugnitto Date: Wed, 1 Mar 2023 13:06:57 -0500 Subject: [PATCH] playwright: cleanup build process The commit updates the `@theia/playwright` package to not install it's dependencies on startup since we often do not run the tests manually but instead handles the package similarly to our examples where they can built on demand. The change should improve the build process without irrelevant logs. Signed-off-by: vince-fugnitto --- .github/workflows/playwright.yml | 7 ++++++- examples/playwright/docs/DEVELOPING.md | 1 + examples/playwright/package.json | 1 - 3 files changed, 7 insertions(+), 2 deletions(-) diff --git a/.github/workflows/playwright.yml b/.github/workflows/playwright.yml index 024ee59b026de..6931300f70e07 100644 --- a/.github/workflows/playwright.yml +++ b/.github/workflows/playwright.yml @@ -33,7 +33,7 @@ jobs: with: python-version: "3.x" - - name: Build + - name: Build Browser shell: bash run: | yarn --skip-integrity-check --network-timeout 100000 @@ -42,6 +42,11 @@ jobs: NODE_OPTIONS: --max_old_space_size=4096 GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} # https://github.com/microsoft/vscode-ripgrep/issues/9 + - name: Build Playwright + shell: bash + run: | + yarn --cwd examples/playwright build + - name: Test (playwright) uses: GabrielBB/xvfb-action@v1 with: diff --git a/examples/playwright/docs/DEVELOPING.md b/examples/playwright/docs/DEVELOPING.md index 8ea6d81d1700e..557c02cdb5244 100644 --- a/examples/playwright/docs/DEVELOPING.md +++ b/examples/playwright/docs/DEVELOPING.md @@ -3,6 +3,7 @@ ## Building Run `yarn` in the root directory of the repository. +In order to build Playwright and install dependencies (ex: chromium) run `yarn --cwd examples/playwright` at the root of the repository. ## Executing the tests diff --git a/examples/playwright/package.json b/examples/playwright/package.json index ca50c9222d289..1ad52fc123339 100644 --- a/examples/playwright/package.json +++ b/examples/playwright/package.json @@ -12,7 +12,6 @@ }, "homepage": "https://github.com/eclipse-theia/theia", "scripts": { - "prepare": "yarn clean && yarn build", "clean": "rimraf lib *.tsbuildinfo", "build": "tsc --incremental && npx playwright install chromium", "theia:start": "rimraf .tmp.cfg && THEIA_CONFIG_DIR=$PWD/.tmp.cfg yarn --cwd ../browser start",