Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Comment incorrectly reports no change #535

Open
RobinClowers opened this issue Dec 15, 2023 · 1 comment
Open

Comment incorrectly reports no change #535

RobinClowers opened this issue Dec 15, 2023 · 1 comment

Comments

@RobinClowers
Copy link

Thanks for publishing this action. Unfortunately, it doesn't seem to be working for me, I generated 2 stats files from different commits, but the comment on the PR says there is no change. Here is a partial diff between the two stat files:

-    "label": "main.ef4c6927.js",
+    "label": "main.1baa3a0e.js",
     "isAsset": true,
-    "statSize": 9680463.559999999,
-    "parsedSize": 3571859,
-    "gzipSize": 1026459,
+    "statSize": 9813627.559999999,
+    "parsedSize": 3610758,
+    "gzipSize": 1039000,

You can see the new main bundle is ~39k larger. Any idea what I might be doing wrong? I've included my full workflow below.

jobs:
  main-bundle-stats:
    name: Calculate main bundle stats
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v3
        with:
          ref: e2e1a19e6f4c5e43d2ed84167317c679099093c1 # only for testing purposes
        # with:
        # ref: ${{ github.base_ref }}
      - uses: actions/setup-node@v3
        with:
          node-version: 18
          cache: "yarn"
      - run: yarn install --frozen-lockfile
      - run: yarn build:analyze:json
      - name: Upload main-bundle-stats.json
        uses: actions/upload-artifact@v3
        with:
          name: main-bundle-stats.json
          path: ./dist/report.json

  head-bundle-stats:
    name: Calculate head bundle stats
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v3
      - uses: actions/setup-node@v3
        with:
          node-version: 18
          cache: "yarn"
      - run: yarn install --frozen-lockfile
      - run: yarn build:analyze:json
      - name: Upload main-bundle-stats.json
        uses: actions/upload-artifact@v3
        with:
          name: head-bundle-stats.json
          path: ./dist/report.json

  report-bundle-size:
    name: Report bundle size difference
    runs-on: ubuntu-latest
    needs: [main-bundle-stats, head-bundle-stats]
    permissions:
      pull-requests: write
    steps:
      - uses: actions/download-artifact@v3
      - uses: github/webpack-bundlesize-compare-action@v1
        with:
          github-token: ${{ secrets.GITHUB_TOKEN }}
          current-stats-json-path: ./head-bundle-stats.json
          base-stats-json-path: ./main-bundle-stats.json
@shimizukawa
Copy link

Same for me.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants