chore: fix chrome-headless ci (#8560)

This commit is contained in:
Alex Rudenko
2022-06-27 12:35:09 +02:00
committed by GitHub
parent e499515fd6
commit 329195011f
3 changed files with 31 additions and 22 deletions

View File

@@ -183,9 +183,9 @@ jobs:
runs-on: ubuntu-latest
strategy:
matrix:
# Include active LTS + current Node.js version.
# Include a current Node.js version.
# https://github.com/nodejs/Release#release-schedule
node: [16, 18]
node: [18]
steps:
- name: Checkout
uses: actions/checkout@v3
@@ -209,7 +209,6 @@ jobs:
npm run build
- name: Run unit tests in headful mode
uses: nick-invision/retry@v2
continue-on-error: true
env:
CHROMIUM: true
HEADLESS: false
@@ -218,15 +217,14 @@ jobs:
command: xvfb-run --auto-servernum npm run test:unit
timeout_minutes: 10
chrome-headless:
linux-chrome-headless:
runs-on: ${{ matrix.os }}
strategy:
matrix:
# https://github.com/actions/virtual-environments#available-environments
os: [ubuntu-latest, macos-latest, windows-latest]
# Include active LTS + current Node.js version.
os: [ubuntu-latest]
# https://github.com/nodejs/Release#release-schedule
node: [16, 18]
node: [18]
steps:
- name: Checkout
uses: actions/checkout@v3
@@ -238,17 +236,19 @@ jobs:
node-version: ${{ matrix.node }}
- name: Install dependencies
run: |
sudo apt-get install xvfb
# Ensure both a Chromium and a Firefox binary are available.
PUPPETEER_PRODUCT=firefox npm install
npm install
ls .local-chromium
ls .local-chromium .local-firefox
- name: Build
run: |
npm run build
- name: Run unit tests
uses: nick-invision/retry@v2
continue-on-error: true
env:
CHROMIUM: true
with:
max_attempts: 1
command: npm run test:unit:chrome-headless
timeout_minutes: 30
command: xvfb-run --auto-servernum npm run test:unit:chrome-headless
timeout_minutes: 10