From c4af7f2fc85678ffcfef17632da7608d6cae631a Mon Sep 17 00:00:00 2001 From: Ross Wollman Date: Tue, 3 May 2022 12:48:35 -0700 Subject: [PATCH] fix: unbreak installation tests, include in primary CI runs (#13903) --- .github/workflows/tests_primary.yml | 29 +++++++++++++++++++ .github/workflows/tests_secondary.yml | 8 +---- .../fixture-scripts/driver-client.js | 2 +- tests/installation/playwright.config.ts | 1 + 4 files changed, 32 insertions(+), 8 deletions(-) diff --git a/.github/workflows/tests_primary.yml b/.github/workflows/tests_primary.yml index 79c936d3fc..667bb908d9 100644 --- a/.github/workflows/tests_primary.yml +++ b/.github/workflows/tests_primary.yml @@ -164,3 +164,32 @@ jobs: if: always() && matrix.os != 'ubuntu-latest' - run: xvfb-run npm run test-web if: always() && matrix.os == 'ubuntu-latest' + + test-package-installations: + name: "Installation Test ${{ matrix.os }} (${{ matrix.node_version }})" + runs-on: ${{ matrix.os }} + strategy: + fail-fast: false + matrix: + os: + - ubuntu-latest + - macos-latest + - windows-latest + node_version: + - "^18.0.0" + timeout-minutes: 30 + steps: + - uses: actions/checkout@v2 + - uses: actions/setup-node@v2 + with: + node-version: ${{ matrix.node_version }} + - run: npm i -g npm@8 + - run: npm ci + env: + DEBUG: pw:install + - run: npm run build + - run: npx playwright install-deps + - run: npm run itest + if: matrix.os != 'ubuntu-latest' + - run: xvfb-run --auto-servernum --server-args="-screen 0 1280x960x24" -- npm run itest + if: matrix.os == 'ubuntu-latest' diff --git a/.github/workflows/tests_secondary.yml b/.github/workflows/tests_secondary.yml index ff5ca9c175..cfaa2690fa 100644 --- a/.github/workflows/tests_secondary.yml +++ b/.github/workflows/tests_secondary.yml @@ -109,18 +109,12 @@ jobs: name: ${{ matrix.browser }}-win-test-results path: test-results - test-package-installations: + test-package-installations-older-node-versions: name: "Installation Test ${{ matrix.os }} (${{ matrix.node_version }})" runs-on: ${{ matrix.os }} strategy: fail-fast: false matrix: - os: - - ubuntu-latest - - macos-latest - - windows-latest - node_version: - - "^18.0.0" include: - os: ubuntu-latest node_version: "^14.1.0" # pre 14.1, zip extraction was broken (https://github.com/microsoft/playwright/issues/1988) diff --git a/tests/installation/fixture-scripts/driver-client.js b/tests/installation/fixture-scripts/driver-client.js index dba12d04d8..d5881d736d 100644 --- a/tests/installation/fixture-scripts/driver-client.js +++ b/tests/installation/fixture-scripts/driver-client.js @@ -28,7 +28,7 @@ const { start } = require('./node_modules/playwright-core/lib/outofprocess'); await browser.close(); console.log(`${browserType} SUCCESS`); } catch (e) { - console.error(`Should be able to launch ${browserType} from ${requireName}`); + console.error(`Should be able to launch ${browserType} from ${process.cwd()}`); console.error(e); process.exit(1); } diff --git a/tests/installation/playwright.config.ts b/tests/installation/playwright.config.ts index bebc4d162f..bc406adf94 100644 --- a/tests/installation/playwright.config.ts +++ b/tests/installation/playwright.config.ts @@ -25,6 +25,7 @@ const config: PlaywrightTestConfig = { plugins: [ gitCommitInfo(), ], + globalSetup: path.join(__dirname, 'globalSetup'), testIgnore: '**\/fixture-scripts/**', timeout: 5 * 60 * 1000, retries: 0,