analyze bundle #34
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: analyze bundle | |
| on: | |
| # pull_request: | |
| # branches: ['master'] | |
| push: | |
| jobs: | |
| build: | |
| name: analyse bundle - read stats.json | |
| runs-on: ubuntu-latest | |
| strategy: | |
| matrix: | |
| node-version: [19.x] | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Setup tmate session | |
| uses: mxschmitt/action-tmate@v3 | |
| with: | |
| limit-access-to-actor: true | |
| - name: Configure Proxy | |
| run: | | |
| echo "HTTP_PROXY=http://192.168.2.53:8090" >> $GITHUB_ENV | |
| - name: Use Node.js ${{ matrix.node-version }} | |
| uses: actions/setup-node@v4 | |
| with: | |
| node-version: ${{ matrix.node-version }} | |
| - name: npm install | |
| run: npm install | |
| - uses: actions/cache@v3 | |
| with: | |
| # cache directory | |
| path: node_modules/.cache/webpack/ | |
| key: ${{ env.GITHUB_REF_NAME }}-webpack-build | |
| # fallback to use "main" branch cache | |
| restore-keys: | | |
| main-webpack-build | |
| - name: check webpack version | |
| run: npx webpack -v | |
| - name: debug | |
| run: npm run debug | |
| - name: symlink | |
| run: npm run symLink | |
| - name: analyse | |
| run: npm run analyse | |
| - name: read stats.json | |
| run: node ./analyze-bundle/report.js |