Perf: virtualize the transaction list over 200 rows #118
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
| # Issue #1437 – post the client bundle-size delta on every PR. | |
| # | |
| # Builds the app, compares total client JS against the committed baseline | |
| # (scripts/bundle-size-baseline.json), and publishes the delta table to the | |
| # job summary (visible from the PR checks tab — works for fork PRs, where | |
| # GITHUB_TOKEN is read-only and a comment API call would be rejected). For | |
| # same-repo branches it additionally upserts a sticky PR comment. | |
| # | |
| # The build runs with CI_SKIP_TYPECHECK=1: bundle size is orthogonal to the | |
| # repo's known type-error backlog, and measurement must not be hostage to it. | |
| # Actions pinned by SHA; version noted beside each. | |
| name: Bundle Size | |
| on: | |
| pull_request: | |
| concurrency: | |
| group: bundle-${{ github.workflow }}-${{ github.ref }} | |
| cancel-in-progress: true | |
| jobs: | |
| bundle-size: | |
| name: Client bundle delta | |
| runs-on: ubuntu-latest | |
| timeout-minutes: 20 | |
| permissions: | |
| pull-requests: write | |
| contents: read | |
| env: | |
| SESSION_PASSWORD: "dummy-test-session-password-must-be-32-chars" | |
| CI_SKIP_TYPECHECK: "1" | |
| steps: | |
| - name: Checkout | |
| # actions/checkout v4.2.2 | |
| uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 | |
| - name: Setup Node.js (with npm cache) | |
| # actions/setup-node v4.1.0 | |
| uses: actions/setup-node@39370e3970a6d050c480ffad4ff0ed4d3fdee5af | |
| with: | |
| node-version: 20 | |
| cache: npm | |
| - name: Install dependencies | |
| run: npm ci | |
| - name: Build | |
| run: npm run build | |
| - name: Compute delta and publish to job summary | |
| run: | | |
| node scripts/bundle-size-delta.js | tee bundle-delta.md | |
| cat bundle-delta.md >> "$GITHUB_STEP_SUMMARY" | |
| - name: Upsert sticky PR comment (same-repo PRs only) | |
| if: github.event.pull_request.head.repo.full_name == github.repository | |
| # actions/github-script v7.0.1 | |
| uses: actions/github-script@60a0d83039c74a4aee543508d2ffcb1c3799cdea | |
| with: | |
| script: | | |
| const fs = require('fs'); | |
| const body = '<!-- bundle-size-delta -->\n' + fs.readFileSync('bundle-delta.md', 'utf8'); | |
| const { data: comments } = await github.rest.issues.listComments({ | |
| ...context.repo, issue_number: context.issue.number, per_page: 100, | |
| }); | |
| const mine = comments.find(c => c.body.startsWith('<!-- bundle-size-delta -->')); | |
| if (mine) { | |
| await github.rest.issues.updateComment({ ...context.repo, comment_id: mine.id, body }); | |
| } else { | |
| await github.rest.issues.createComment({ ...context.repo, issue_number: context.issue.number, body }); | |
| } |