fixup! fixup! fixup! CI: update script to use xvfb-run in linux/osx #5
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
# https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-nodejs | |
name: ci | |
on: | |
push: | |
branches: [ master ] | |
pull_request: | |
branches: [ master ] | |
jobs: | |
ci: | |
runs-on: ${{ matrix.os }} | |
strategy: | |
fail-fast: false | |
matrix: | |
node-version: [16.x, 18.x, 20.x] | |
os: [ubuntu-latest, windows-latest, macos-latest] | |
steps: | |
- uses: actions/checkout@v3 | |
with: | |
submodules: true | |
- uses: actions/setup-node@v3 | |
with: | |
node-version: ${{ matrix.node-version }} | |
- if: startsWith(matrix.os, 'ubuntu') | |
run: sudo apt-get install -y build-essential libglew-dev libglu1-mesa-dev libxi-dev pkg-config | |
- run: npm ci | |
- run: npm run build --if-present | |
- name: npm test (windows) | |
if: startsWith(matrix.os, 'windows') | |
run: npm test | |
- name: npm test (osx / linux) | |
if: "${{ !startsWith(matrix.os, 'windows') }}" | |
run: | | |
which npm && | |
which glxinfo && | |
xvfb-run --auto-servernum --server-num=1 -s "-ac -screen 0 1280x1024x24" $(which glxinfo) && | |
xvfb-run --auto-servernum --server-num=1 -s "-ac -screen 0 1280x1024x24" $(which npm) test |