chore: fix Actions Node version to LTS (#9859)

This commit is contained in:
Nikolay Vitkov 2023-03-15 13:59:42 +01:00 committed by GitHub
parent 29aa5c41ae
commit 4351e0de9e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
4 changed files with 19 additions and 19 deletions

View File

@ -28,7 +28,7 @@ jobs:
uses: actions/setup-node@v3.5.1 uses: actions/setup-node@v3.5.1
with: with:
cache: npm cache: npm
node-version: latest node-version: lts/*
- name: Install dependencies - name: Install dependencies
run: npm ci run: npm ci
env: env:
@ -74,7 +74,7 @@ jobs:
uses: actions/setup-node@v3.5.1 uses: actions/setup-node@v3.5.1
with: with:
cache: npm cache: npm
node-version: latest node-version: lts/*
- name: Install dependencies - name: Install dependencies
working-directory: ./website working-directory: ./website
run: npm ci run: npm ci
@ -126,7 +126,7 @@ jobs:
uses: actions/setup-node@v3.5.1 uses: actions/setup-node@v3.5.1
with: with:
cache: npm cache: npm
node-version: latest node-version: lts/*
- name: Install dependencies - name: Install dependencies
run: npm ci run: npm ci
env: env:
@ -140,14 +140,14 @@ jobs:
key: ${{ runner.os }}-chromium-${{ hashFiles('packages/puppeteer-core/src/revisions.ts') }} key: ${{ runner.os }}-chromium-${{ hashFiles('packages/puppeteer-core/src/revisions.ts') }}
- name: Install Chromium - name: Install Chromium
run: npm run postinstall run: npm run postinstall
- name: Install linux dependencies.
if: ${{ matrix.os == 'ubuntu-latest' }}
run: sudo apt-get install xvfb
- name: Tests types - name: Tests types
run: npm run test-types run: npm run test-types
- name: Run all tests (for non-Linux) - name: Run all tests (for non-Linux)
if: ${{ matrix.os != 'ubuntu-latest' }} if: ${{ matrix.os != 'ubuntu-latest' }}
run: npm run test -- --test-suite ${{ matrix.suite }} 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) - name: Run all tests (for Linux)
if: ${{ matrix.os == 'ubuntu-latest' }} if: ${{ matrix.os == 'ubuntu-latest' }}
run: xvfb-run --auto-servernum npm run test -- --test-suite ${{ matrix.suite }} run: xvfb-run --auto-servernum npm run test -- --test-suite ${{ matrix.suite }}
@ -184,7 +184,7 @@ jobs:
uses: actions/setup-node@v3.5.1 uses: actions/setup-node@v3.5.1
with: with:
cache: npm cache: npm
node-version: latest node-version: lts/*
- name: Install dependencies - name: Install dependencies
run: npm ci run: npm ci
env: env:
@ -200,14 +200,14 @@ jobs:
env: env:
PUPPETEER_PRODUCT: firefox PUPPETEER_PRODUCT: firefox
run: npm run postinstall run: npm run postinstall
- name: Install linux dependencies.
if: ${{ matrix.os == 'ubuntu-latest' }}
run: sudo apt-get install xvfb
- name: Tests types - name: Tests types
run: npm run test-types run: npm run test-types
- name: Run all tests (for non-Linux) - name: Run all tests (for non-Linux)
if: ${{ matrix.os != 'ubuntu-latest' }} if: ${{ matrix.os != 'ubuntu-latest' }}
run: npm run test -- --test-suite ${{ matrix.suite }} 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) - name: Run all tests (for Linux)
if: ${{ matrix.os == 'ubuntu-latest' }} if: ${{ matrix.os == 'ubuntu-latest' }}
run: xvfb-run --auto-servernum npm run test -- --test-suite ${{ matrix.suite }} run: xvfb-run --auto-servernum npm run test -- --test-suite ${{ matrix.suite }}
@ -234,7 +234,7 @@ jobs:
uses: actions/setup-node@v3.5.1 uses: actions/setup-node@v3.5.1
with: with:
cache: npm cache: npm
node-version: latest node-version: lts/*
- name: Install dependencies - name: Install dependencies
run: npm ci run: npm ci
env: env:
@ -316,7 +316,7 @@ jobs:
uses: actions/setup-node@v3.5.1 uses: actions/setup-node@v3.5.1
with: with:
cache: npm cache: npm
node-version: ${{ matrix.node }} node-version: lts/*
- name: Install dependencies - name: Install dependencies
run: npm ci run: npm ci
env: env:
@ -346,7 +346,7 @@ jobs:
uses: actions/setup-node@v3.5.1 uses: actions/setup-node@v3.5.1
with: with:
cache: npm cache: npm
node-version: latest node-version: lts/*
- name: Install dependencies - name: Install dependencies
run: npm ci run: npm ci
env: env:
@ -373,7 +373,7 @@ jobs:
uses: actions/setup-node@v3.5.1 uses: actions/setup-node@v3.5.1
with: with:
cache: npm cache: npm
node-version: latest node-version: lts/*
- name: Install dependencies - name: Install dependencies
run: npm ci run: npm ci
env: env:

View File

@ -58,7 +58,7 @@ jobs:
- name: Set up Node.js - name: Set up Node.js
uses: actions/setup-node@v3.5.1 uses: actions/setup-node@v3.5.1
with: with:
node-version: latest node-version: lts/*
- name: Install dependencies - name: Install dependencies
run: npm install run: npm install
- name: Analyze issue - name: Analyze issue

View File

@ -32,7 +32,7 @@ jobs:
uses: actions/setup-node@v3.5.1 uses: actions/setup-node@v3.5.1
with: with:
cache: npm cache: npm
node-version: latest node-version: lts/*
- name: Install dependencies - name: Install dependencies
run: npm ci run: npm ci
env: env:

View File

@ -54,7 +54,7 @@ describe('Chromium-Specific Launcher tests', function () {
}) })
).toBe(56); ).toBe(56);
browser2.disconnect(); browser2.disconnect();
originalBrowser.close(); await originalBrowser.close();
}); });
it('should throw when using both browserWSEndpoint and browserURL', async () => { it('should throw when using both browserWSEndpoint and browserURL', async () => {
const {defaultBrowserOptions, puppeteer} = getTestState(); const {defaultBrowserOptions, puppeteer} = getTestState();
@ -79,7 +79,7 @@ describe('Chromium-Specific Launcher tests', function () {
'Exactly one of browserWSEndpoint, browserURL or transport' 'Exactly one of browserWSEndpoint, browserURL or transport'
); );
originalBrowser.close(); await originalBrowser.close();
}); });
it('should throw when trying to connect to non-existing browser', async () => { it('should throw when trying to connect to non-existing browser', async () => {
const {defaultBrowserOptions, puppeteer} = getTestState(); const {defaultBrowserOptions, puppeteer} = getTestState();
@ -98,7 +98,7 @@ describe('Chromium-Specific Launcher tests', function () {
expect(error.message).toContain( expect(error.message).toContain(
'Failed to fetch browser webSocket URL from' 'Failed to fetch browser webSocket URL from'
); );
originalBrowser.close(); await originalBrowser.close();
}); });
}); });