Add .npmrc ignore-scripts=true (Miasma install-hook mitigation) #1355
Workflow file for this run
This file contains hidden or 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
| name: Rollbar.js CI | |
| on: | |
| push: | |
| branches: [master] | |
| tags: [v*] | |
| pull_request: | |
| permissions: | |
| checks: write | |
| contents: read | |
| jobs: | |
| build: | |
| runs-on: ubuntu-22.04 | |
| timeout-minutes: 20 | |
| # `latest` is a floating, non-LTS target used as a forward-compat canary; | |
| # let it warn without blocking PRs or (with fail-fast off) cancelling the | |
| # supported legs. | |
| continue-on-error: ${{ matrix.node == 'latest' }} | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| include: | |
| - node: 18 | |
| npm: ^9 | |
| - node: 20 | |
| npm: ^10 | |
| - node: 22 | |
| npm: ^10 | |
| - node: 24 | |
| npm: ^11 | |
| - node: latest | |
| npm: latest | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v4 | |
| - name: Set up node ${{ matrix.node }} | |
| uses: actions/setup-node@v4 | |
| with: | |
| node-version: ${{ matrix.node }} | |
| - name: Update npm | |
| run: npm install -g npm@${{ matrix.npm }} | |
| - name: npm install | |
| run: npm install | |
| - name: Lint | |
| uses: wearerequired/lint-action@v2 | |
| with: | |
| github_token: ${{ secrets.GITHUB_TOKEN }} | |
| prettier: true | |
| prettier_extensions: js,cjs,mjs,md,json,yml,yaml | |
| eslint: true | |
| eslint_args: '--max-warnings 0' | |
| eslint_extensions: js,mjs,cjs | |
| - name: Build | |
| run: npm run build | |
| - name: Validate ES5 compatibility | |
| run: npm run validate:es5 | |
| - name: Run server tests | |
| run: npm run test:server | |
| # Browser tests launch chromium; the harness Node version is irrelevant to | |
| # browser coverage, so run them only on stable Node. The chromium download | |
| # in `playwright install` stalls indefinitely on Node 24/latest. | |
| - name: Install Playwright browsers | |
| if: matrix.node != 24 && matrix.node != 'latest' | |
| # The chromium download can stall; cap each attempt and retry so a | |
| # transient stall doesn't hang the job until the timeout. | |
| run: | | |
| for i in 1 2 3; do | |
| timeout 300 npx playwright install chromium && exit 0 | |
| echo "playwright install attempt $i stalled or failed; retrying" | |
| done | |
| exit 1 | |
| - name: Run browser tests (Web Test Runner) | |
| if: matrix.node != 24 && matrix.node != 'latest' | |
| run: npm run test:wtr | |
| - name: Validate examples | |
| run: npm run validate:examples |