fix(ci): repair Node.js CI (Chrome install, bundle-size limits, ts-async offline-channel hang) #4330
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 | |
| # Prevent the many npm/rush install steps below from each racing to download | |
| # Chrome into the shared ~/.cache/puppeteer, which left partial extractions | |
| # ("browser folder exists but the executable is missing") and broke installs. | |
| # Chrome is installed once, cleanly, in a dedicated step before build/test. | |
| 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: Install Chrome for Testing (clean, with retries) | |
| run: | | |
| for i in 1 2 3; do | |
| rm -rf ~/.cache/puppeteer | |
| PUPPETEER_SKIP_DOWNLOAD=false node node_modules/puppeteer/install.mjs && break | |
| echo "Chrome install attempt $i failed; retrying..." | |
| sleep 5 | |
| done | |
| - run: npm run build --verbose | |
| timeout-minutes: 20 | |
| - run: npm run test --verbose | |
| timeout-minutes: 30 |