feat: support chrome headless mode (#8260)

* feat: support chrome headless mode

Co-authored-by: Ergün Erdoğmuş <erdogmusergun@gmail.com>
This commit is contained in:
Alex Rudenko
2022-04-25 13:11:23 +02:00
committed by GitHub
parent 260ad5dfcb
commit 1308d9aa6a
6 changed files with 45 additions and 10 deletions

View File

@@ -201,17 +201,14 @@ jobs:
uses: actions/setup-node@v3.1.1
with:
node-version: ${{ matrix.node }}
- name: Install dependencies
run: |
sudo apt-get install xvfb
npm install
ls .local-chromium
- name: Build
run: |
npm run build
- name: Run unit tests in headful mode
uses: nick-invision/retry@v2
continue-on-error: true
@@ -222,3 +219,36 @@ jobs:
max_attempts: 1
command: xvfb-run --auto-servernum npm run unit
timeout_minutes: 10
chrome-headless-checks:
runs-on: ${{ matrix.os }}
strategy:
matrix:
# https://github.com/actions/virtual-environments#available-environments
os: [ubuntu-latest, macos-latest, windows-latest]
node: [16]
steps:
- name: Checkout
uses: actions/checkout@v3
with:
fetch-depth: 2
- name: Set up Node.js
uses: actions/setup-node@v3.1.1
with:
node-version: ${{ matrix.node }}
- name: Install dependencies
run: |
npm install
ls .local-chromium
- 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 chrome-headless-unit
timeout_minutes: 30