diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 82e0d75f528..af0469c8838 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -28,7 +28,7 @@ jobs: uses: actions/setup-node@v3.5.1 with: cache: npm - node-version: latest + node-version: lts/* - name: Install dependencies run: npm ci env: @@ -74,7 +74,7 @@ jobs: uses: actions/setup-node@v3.5.1 with: cache: npm - node-version: latest + node-version: lts/* - name: Install dependencies working-directory: ./website run: npm ci @@ -126,7 +126,7 @@ jobs: uses: actions/setup-node@v3.5.1 with: cache: npm - node-version: latest + node-version: lts/* - name: Install dependencies run: npm ci env: @@ -140,14 +140,14 @@ jobs: key: ${{ runner.os }}-chromium-${{ hashFiles('packages/puppeteer-core/src/revisions.ts') }} - name: Install Chromium run: npm run postinstall - - name: Install linux dependencies. - if: ${{ matrix.os == 'ubuntu-latest' }} - run: sudo apt-get install xvfb - name: Tests types run: npm run test-types - name: Run all tests (for non-Linux) if: ${{ matrix.os != 'ubuntu-latest' }} run: npm run test -- --test-suite ${{ matrix.suite }} + - name: Install linux dependencies. + if: ${{ matrix.os == 'ubuntu-latest' }} + run: sudo apt-get install xvfb - name: Run all tests (for Linux) if: ${{ matrix.os == 'ubuntu-latest' }} run: xvfb-run --auto-servernum npm run test -- --test-suite ${{ matrix.suite }} @@ -184,7 +184,7 @@ jobs: uses: actions/setup-node@v3.5.1 with: cache: npm - node-version: latest + node-version: lts/* - name: Install dependencies run: npm ci env: @@ -200,14 +200,14 @@ jobs: env: PUPPETEER_PRODUCT: firefox run: npm run postinstall - - name: Install linux dependencies. - if: ${{ matrix.os == 'ubuntu-latest' }} - run: sudo apt-get install xvfb - name: Tests types run: npm run test-types - name: Run all tests (for non-Linux) if: ${{ matrix.os != 'ubuntu-latest' }} run: npm run test -- --test-suite ${{ matrix.suite }} + - name: Install linux dependencies. + if: ${{ matrix.os == 'ubuntu-latest' }} + run: sudo apt-get install xvfb - name: Run all tests (for Linux) if: ${{ matrix.os == 'ubuntu-latest' }} run: xvfb-run --auto-servernum npm run test -- --test-suite ${{ matrix.suite }} @@ -234,7 +234,7 @@ jobs: uses: actions/setup-node@v3.5.1 with: cache: npm - node-version: latest + node-version: lts/* - name: Install dependencies run: npm ci env: @@ -316,7 +316,7 @@ jobs: uses: actions/setup-node@v3.5.1 with: cache: npm - node-version: ${{ matrix.node }} + node-version: lts/* - name: Install dependencies run: npm ci env: @@ -346,7 +346,7 @@ jobs: uses: actions/setup-node@v3.5.1 with: cache: npm - node-version: latest + node-version: lts/* - name: Install dependencies run: npm ci env: @@ -373,7 +373,7 @@ jobs: uses: actions/setup-node@v3.5.1 with: cache: npm - node-version: latest + node-version: lts/* - name: Install dependencies run: npm ci env: diff --git a/.github/workflows/issue-analyzer.yml b/.github/workflows/issue-analyzer.yml index f59596a6d59..48d094a9740 100644 --- a/.github/workflows/issue-analyzer.yml +++ b/.github/workflows/issue-analyzer.yml @@ -58,7 +58,7 @@ jobs: - name: Set up Node.js uses: actions/setup-node@v3.5.1 with: - node-version: latest + node-version: lts/* - name: Install dependencies run: npm install - name: Analyze issue diff --git a/.github/workflows/tot-ci.yml b/.github/workflows/tot-ci.yml index 05abd8fcd7f..5eb8b2ff043 100644 --- a/.github/workflows/tot-ci.yml +++ b/.github/workflows/tot-ci.yml @@ -32,7 +32,7 @@ jobs: uses: actions/setup-node@v3.5.1 with: cache: npm - node-version: latest + node-version: lts/* - name: Install dependencies run: npm ci env: diff --git a/test/src/chromiumonly.spec.ts b/test/src/chromiumonly.spec.ts index b5489738bd5..162b2244632 100644 --- a/test/src/chromiumonly.spec.ts +++ b/test/src/chromiumonly.spec.ts @@ -54,7 +54,7 @@ describe('Chromium-Specific Launcher tests', function () { }) ).toBe(56); browser2.disconnect(); - originalBrowser.close(); + await originalBrowser.close(); }); it('should throw when using both browserWSEndpoint and browserURL', async () => { const {defaultBrowserOptions, puppeteer} = getTestState(); @@ -79,7 +79,7 @@ describe('Chromium-Specific Launcher tests', function () { 'Exactly one of browserWSEndpoint, browserURL or transport' ); - originalBrowser.close(); + await originalBrowser.close(); }); it('should throw when trying to connect to non-existing browser', async () => { const {defaultBrowserOptions, puppeteer} = getTestState(); @@ -98,7 +98,7 @@ describe('Chromium-Specific Launcher tests', function () { expect(error.message).toContain( 'Failed to fetch browser webSocket URL from' ); - originalBrowser.close(); + await originalBrowser.close(); }); });