fix(explorer): hide private zone receipt side amounts #1773
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
| name: Bundle Size | |
| on: | |
| push: | |
| branches: [main] | |
| # No path filter on main - we need to generate baseline on every push | |
| # so PRs always compare against the latest main, even if main has | |
| # commits that don't touch explorer (e.g., workflow changes, other apps) | |
| pull_request: | |
| types: [opened, reopened, synchronize] | |
| paths: | |
| - "apps/explorer/**" | |
| - "pnpm-lock.yaml" | |
| permissions: {} | |
| concurrency: | |
| group: bundle-size-${{ github.head_ref || github.ref }} | |
| cancel-in-progress: true | |
| env: | |
| NODE_ENV: production | |
| NODE_OPTIONS: '--disable-warning=ExperimentalWarning --disable-warning=DeprecationWarning' | |
| jobs: | |
| bundle-size: | |
| name: Bundle Size | |
| runs-on: ${{ vars.DEPOT_ENABLED == 'true' && 'depot-ubuntu-latest' || 'ubuntu-latest' }} | |
| permissions: | |
| actions: write | |
| pull-requests: write | |
| contents: write | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd | |
| with: | |
| submodules: "recursive" | |
| persist-credentials: false | |
| - name: Install dependencies | |
| uses: ./.github/actions/install-dependencies | |
| - name: Generate Worker types | |
| run: pnpm gen:types | |
| working-directory: apps/explorer | |
| - name: Restore baseline from cache | |
| if: github.event_name == 'pull_request' | |
| id: cache-restore | |
| uses: actions/cache/restore@668228422ae6a00e4ad889ee87cd7109ec5666a7 | |
| with: | |
| path: apps/explorer/bundle-stats.json | |
| key: bundle-stats-explorer-main-latest | |
| restore-keys: | | |
| bundle-stats-explorer-main- | |
| - name: Move baseline if exists | |
| if: github.event_name == 'pull_request' && steps.cache-restore.outputs.cache-hit == 'true' | |
| run: mv apps/explorer/bundle-stats.json apps/explorer/baseline-stats.json | |
| - name: Build with bundle analysis | |
| working-directory: apps/explorer | |
| env: | |
| ANALYZE: "true" | |
| ANALYZE_JSON: "true" | |
| run: pnpm build | |
| - name: Parse bundle stats (main branch) | |
| if: github.event_name == 'push' && github.ref == 'refs/heads/main' | |
| working-directory: apps/explorer | |
| run: | | |
| node --experimental-strip-types scripts/bundle-diff.ts \ | |
| --skip-build \ | |
| --output bundle-stats.json | |
| - name: Save bundle stats to cache (main branch) | |
| if: github.event_name == 'push' && github.ref == 'refs/heads/main' | |
| uses: actions/cache/save@668228422ae6a00e4ad889ee87cd7109ec5666a7 | |
| with: | |
| path: apps/explorer/bundle-stats.json | |
| key: bundle-stats-explorer-main-${{ github.sha }} | |
| - name: Delete old latest cache (main branch) | |
| if: github.event_name == 'push' && github.ref == 'refs/heads/main' | |
| continue-on-error: true | |
| env: | |
| GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
| run: gh cache delete bundle-stats-explorer-main-latest --repo ${{ github.repository }} | |
| - name: Save bundle stats with stable key (main branch) | |
| if: github.event_name == 'push' && github.ref == 'refs/heads/main' | |
| uses: actions/cache/save@668228422ae6a00e4ad889ee87cd7109ec5666a7 | |
| with: | |
| path: apps/explorer/bundle-stats.json | |
| key: bundle-stats-explorer-main-latest | |
| - name: Generate bundle report (PR) | |
| if: github.event_name == 'pull_request' | |
| id: bundle-report | |
| working-directory: apps/explorer | |
| run: | | |
| if [ -f baseline-stats.json ]; then | |
| REPORT=$(node --experimental-strip-types scripts/bundle-diff.ts \ | |
| --ci \ | |
| --skip-build \ | |
| --baseline baseline-stats.json) | |
| else | |
| REPORT=$(node --experimental-strip-types scripts/bundle-diff.ts \ | |
| --ci \ | |
| --skip-build) | |
| fi | |
| # Write to file for the comment action | |
| echo "$REPORT" > bundle-report.md | |
| # Also output for debugging | |
| echo "$REPORT" | |
| - name: Post or update PR comment | |
| if: github.event_name == 'pull_request' | |
| uses: tempoxyz/gh-actions/actions/pr-comment@ab45d76f6e7420a094281a22aee1973ecc0754f8 | |
| with: | |
| number: ${{ github.event.pull_request.number }} | |
| header: bundle-size-report | |
| path: apps/explorer/bundle-report.md | |
| - name: Upload Sonda report artifact | |
| uses: actions/upload-artifact@bbbca2ddaa5d8feaa63e36b76fdaad77386f024f | |
| with: | |
| name: sonda-bundle-report-${{ github.event_name == 'pull_request' && format('pr-{0}', github.event.pull_request.number) || format('main-{0}', github.sha) }} | |
| path: apps/explorer/.sonda/ | |
| retention-days: 90 | |
| - name: Deploy to GitHub Pages (main only) | |
| if: github.event_name == 'push' && github.ref == 'refs/heads/main' | |
| uses: tempoxyz/gh-actions/vendor/peaceiris/actions-gh-pages@6f436eb3a168279692739e8c0c9fdb52b94bfae7 | |
| with: | |
| github_token: ${{ secrets.GITHUB_TOKEN }} | |
| publish_dir: ./apps/explorer/.sonda | |
| destination_dir: explorer-bundle-stats | |
| keep_files: false |