name: npmjs

on: [push, pull_request, release]

jobs:
  build:
    runs-on: ubuntu-latest
    strategy:
      matrix:
        node: [ '14', '16' ]
    steps:
      - uses: actions/checkout@v2
      - uses: actions/setup-node@v2
        with:
          node-version: ${{ matrix.node }}
          registry-url: https://registry.npmjs.org/
      - run: npm install -g npm@^6
      - run: npm install -g grunt-cli
      - run: npm ci
      - run: npm test
      - run: npm run test-browsers
      - run: npm run beautify
      - run: npm run build-docs
      - name: Run npm publish
        if: github.event_name == 'release' && github.event.action == 'created' && matrix.node == '16'
        run: npm publish
        env:
          NODE_AUTH_TOKEN: ${{secrets.npm_token}}

name: npmjs

on: [push, pull_request, release]

jobs:
  build:
    runs-on: ubuntu-latest
    strategy:
      matrix:
        node: [ '14', '16' ]
    steps:
      - uses: actions/checkout@v2
      - uses: actions/setup-node@v2
        with:
          node-version: ${{ matrix.node }}
          registry-url: https://registry.npmjs.org/
      - run: npm install -g npm@^6
      - run: npm install -g grunt-cli
      - run: npm ci
      - run: npm test
      - run: sudo apt-get install xvfb
      - run: xvfb-run --auto-servernum npm run test-browsers
      - run: npm run beautify
      - run: npm run build-docs
      - name: Run npm publish
        if: github.event_name == 'release' && github.event.action == 'created' && matrix.node == '16'
        run: npm publish
        env:
          NODE_AUTH_TOKEN: ${{secrets.npm_token}}

Add support for headless tests
Add support for headless tests
