on:
  push:
  pull_request:

jobs:
  build:
    runs-on: ubuntu-latest
    steps:
    - uses: actions/checkout@v2
    - uses: actions/setup-node@v2
      with:
        node-version: 16
    - run: npm ci
    - run: sudo apt-get install xvfb
    - name: Lint
      run: npm run lint
    - name: Test
      run: npm install --no-save "gl@^5.0.0" && xvfb-run --auto-servernum npm run jest
    - name: Build
      run: npm run build
