Skip to content

Build and Test

Build and Test #4058

Workflow file for this run

name: Build and Test
on:
pull_request:
merge_group:
jobs:
build-test:
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-20.04]
node: [18, 20]
name: ${{ matrix.os }} and node ${{ matrix.node }}
steps:
- uses: actions/checkout@v2
- name: Setup node
uses: actions/setup-node@v1
with:
node-version: ${{ matrix.node }}
- name: Install dependencies
run: |
npm ci
sudo apt-get install xvfb
- name: Build
run: npm run build:release
- name: Archive build output
if: github.event_name != 'merge_group'
uses: actions/upload-artifact@v3
with:
name: build-results
path: dist
retention-days: 15
- name: Validate generated typescript definitions
run: |
npx tsc -p tsconfig.esm-check.json
npx tsc -p tsconfig.umd-check.json
- name: Chrome and Firefox tests
run: xvfb-run --auto-servernum npm run test -- --browsers Chrome,Firefox
- name: Archive test results
if: github.event_name != 'merge_group' && (success() || failure())
uses: actions/upload-artifact@v3
continue-on-error: true
with:
name: test-results
path: Utilities/TestResults/Test-Report.html
retention-days: 15