try #14
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: CI | |
on: | |
push: | |
pull_request: | |
branches: [master] | |
jobs: | |
ci: | |
runs-on: ${{ matrix.os }} | |
strategy: | |
fail-fast: false | |
matrix: | |
node-version: [18.x, 20.x] | |
os: [ubuntu-latest, windows-latest, macos-latest] | |
steps: | |
- uses: actions/checkout@v4 | |
with: | |
submodules: true | |
- uses: actions/setup-node@v4 | |
with: | |
node-version: ${{ matrix.node-version }} | |
cache: 'npm' | |
- name: Install dependencies on Ubuntu | |
if: startsWith(matrix.os, 'ubuntu') | |
run: sudo apt-get install -y build-essential libgl1-mesa-dri libglapi-mesa \ | |
libglew-dev libglu1-mesa-dev libosmesa6 \ | |
libxi-dev mesa-utils pkg-config | |
- name: Install node dependencies | |
run: npm ci | |
- name: Build project | |
run: npm run build | |
- name: Run tests on Ubuntu | |
if: startsWith(matrix.os, 'ubuntu') | |
run: xvfb-run npm test:unit | |
- name: Run tests on non-Ubuntu | |
if: "!startsWith(matrix.os, 'ubuntu')" | |
run: npm test:unit | |
- name: Run E2e tests on Ubuntu | |
if: startsWith(matrix.os, 'ubuntu') | |
run: xvfb-run npm test:e2e | |
- name: Run E2e tests on non-Ubuntu | |
if: "!startsWith(matrix.os, 'ubuntu')" | |
run: npm test:e2e |