Skip to content

Run Performance Tests #760

Run Performance Tests

Run Performance Tests #760

# This ensures that the tests can run
name: Run Performance Tests
on:
workflow_dispatch:
schedule:
- cron: '* 3 * * 0'
pull_request:
branches:
- master
paths:
- '.github/actions/build-setup/**/*'
- '.github/actions/install-playwright-browser/**/*'
- '.github/workflows/test-performance.yml'
- 'test/*' # root folder
- 'test/config/**/*'
- 'test/fixtures/performance/**/*'
- 'test/performance/**/*'
- 'test/shared/**/*'
- '.nvmrc'
jobs:
test_performance:
runs-on: ${{ matrix.os }}
strategy:
# we want to run the full build on all os: don't cancel running jobs even if one fails
fail-fast: false
matrix:
# disable windows-2022 in a first implementation as it always fails. Require more investigations.
# node:internal/process/promises:279
# triggerUncaughtException(err, true /* fromPromise */);
# ^
# cdpSession.detach: Browser closed.
os: [macos-13, ubuntu-22.04]
env:
# Performance tests rely on chromium API
browser: chromium
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Build Setup
uses: ./.github/actions/build-setup
- name: Install ${{env.browser}}
uses: ./.github/actions/install-playwright-browser
with:
browser: ${{env.browser}}
- name: Run performance tests
id: 'run_perf_tests'
run: npm run test:perf
- name: Upload test results
if: success()
uses: actions/upload-artifact@v4
with:
name: perf-test-results-${{matrix.os}}-${{github.sha}}
path: |
test/performance/index.html
test/performance/data/