name: CI (node.js) on: [push, pull_request] permissions: contents: read concurrency: group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }} cancel-in-progress: true jobs: build: runs-on: ubuntu-latest env: node-version: "16" steps: - uses: actions/checkout@v3 - name: Use Node.js ${{ env.node-version }} uses: actions/setup-node@v3 with: node-version: ${{ env.node-version }} cache: "npm" - run: npm install - name: Run headless test run: xvfb-run -a npm test