name: CI on: push: branches: [main] pull_request: workflow_dispatch: # allow manual runs from the GitHub UI # Cancel an in-progress run when a newer commit is pushed to the same ref. concurrency: group: ${{ github.workflow }}-${{ github.ref }} cancel-in-progress: true permissions: contents: read jobs: ci: name: ${{ matrix.os }} / Node ${{ matrix.node }} strategy: fail-fast: false matrix: os: [ubuntu-latest, macos-latest, windows-latest] node: [20] runs-on: ${{ matrix.os }} steps: - uses: actions/checkout@v4 - name: Set up Node.js uses: actions/setup-node@v4 with: node-version: ${{ matrix.node }} cache: npm # `npm ci` does a clean, reproducible install from package-lock.json # and fails on lockfile drift. - name: Install dependencies run: npm ci - name: Format check run: npm run format:check - name: Lint run: npm run lint - name: Test run: npm test - name: Build run: npm run build - name: Verify portable standalone dependencies run: npm run verify:standalone - name: Verify package contents run: npm pack --dry-run --ignore-scripts