fix: Migrate from npm to pnpm and resolve all dependency vulnerabilities #4339
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
| # This workflow will do a clean install of node dependencies, build the source code and run tests across different versions of node | |
| # For more information see: https://help.github.com/actions/language-and-framework-guides/using-nodejs-with-github-actions | |
| name: Node.js CI | |
| permissions: | |
| contents: read | |
| on: | |
| push: | |
| branches: [ main, master, beta, Release2.7, release-3.0 ] | |
| pull_request: | |
| branches: [ main, master, beta, Release2.7, release-3.0 ] | |
| merge_group: | |
| branches: [ "main", "master", "beta", "Release*", "release*", "*-legacy", "legacy-v1" ] | |
| jobs: | |
| build: | |
| runs-on: ubuntu-latest | |
| # The puppeteer browser download into the shared ~/.cache/puppeteer was racing | |
| # across the many npm/rush install steps and intermittently failed extraction | |
| # ("browser folder exists but the executable is missing"), breaking installs. | |
| # Skip the puppeteer browser download entirely and run the QUnit tests against | |
| # the runner's pre-installed Chrome (see the "pre-installed Chrome" step below). | |
| env: | |
| PUPPETEER_SKIP_DOWNLOAD: 'true' | |
| strategy: | |
| matrix: | |
| node-version: [ 18, 20, 22, 24 ] | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Use Node.js ${{ matrix.node-version }} | |
| uses: actions/setup-node@v4 | |
| with: | |
| node-version: ${{ matrix.node-version }} | |
| - name: Update rush shrinkwrap dependencies (for different node versions) | |
| run: node common/scripts/install-run-rush.js update --full --recheck | |
| - run: npm install rollup -g | |
| - run: npm install grunt-cli | |
| - run: npm install | |
| - run: node common/scripts/install-run-rush.js check | |
| - run: node common/scripts/install-run-rush.js update --full --recheck | |
| - name: Use the runner's pre-installed Chrome for Puppeteer | |
| run: | | |
| CHROME_BIN="${CHROME_BIN:-$(command -v google-chrome || command -v google-chrome-stable || command -v chromium-browser || command -v chromium)}" | |
| if [ -z "$CHROME_BIN" ]; then | |
| echo "No system Chrome/Chromium found on the runner" >&2 | |
| exit 1 | |
| fi | |
| echo "Using Chrome at: $CHROME_BIN" | |
| "$CHROME_BIN" --version || true | |
| echo "PUPPETEER_EXECUTABLE_PATH=$CHROME_BIN" >> "$GITHUB_ENV" | |
| - run: npm run build --verbose | |
| timeout-minutes: 20 | |
| - run: npm run test --verbose | |
| timeout-minutes: 30 |