Skip to content

Commit 8b7a7e4

Browse files
feat: unified PR report combining bundle size and runtime perf
Replace separate pr-size-report.yaml and pr-perf-report.yaml with a single pr-report.yaml aggregator that triggers on both CI workflow completions. Produces one combined PR comment with bundle size and performance sections, showing 'pending' placeholders for whichever section hasn't completed yet. Key changes: - Add head-sha metadata to both CI workflows for stale-run detection - Add concurrency to ci-size-data.yaml (matches ci-perf-report.yaml) - Create unified-report.js that shells out to existing size-report.js and perf-report.ts, combining their output - Clean up legacy separate comment markers on first run - Use PR head SHA as concurrency key to prevent race conditions
1 parent 64c852b commit 8b7a7e4

File tree

6 files changed

+285
-282
lines changed

6 files changed

+285
-282
lines changed

.github/workflows/ci-perf-report.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -64,6 +64,7 @@ jobs:
6464
mkdir -p temp/perf-meta
6565
echo "${{ github.event.number }}" > temp/perf-meta/number.txt
6666
echo "${{ github.event.pull_request.base.ref }}" > temp/perf-meta/base.txt
67+
echo "${{ github.event.pull_request.head.sha }}" > temp/perf-meta/head-sha.txt
6768
6869
- name: Upload PR metadata
6970
if: github.event_name == 'pull_request'

.github/workflows/ci-size-data.yaml

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,10 @@ on:
88
branches:
99
- main
1010

11+
concurrency:
12+
group: size-${{ github.ref }}
13+
cancel-in-progress: true
14+
1115
permissions:
1216
contents: read
1317

@@ -28,11 +32,12 @@ jobs:
2832
- name: Collect size data
2933
run: node scripts/size-collect.js
3034

31-
- name: Save PR number & base branch
35+
- name: Save PR metadata
3236
if: ${{ github.event_name == 'pull_request' }}
3337
run: |
3438
echo ${{ github.event.number }} > ./temp/size/number.txt
3539
echo ${{ github.base_ref }} > ./temp/size/base.txt
40+
echo ${{ github.event.pull_request.head.sha }} > ./temp/size/head-sha.txt
3641
3742
- name: Upload size data
3843
uses: actions/upload-artifact@v6

.github/workflows/pr-perf-report.yaml

Lines changed: 0 additions & 148 deletions
This file was deleted.

0 commit comments

Comments
 (0)