4949 run : pnpm install --frozen-lockfile
5050
5151 - name : Backup original data
52- run : cp -r data data-backup
52+ run : |
53+ mkdir -p backup/data backup/report-src-data backup/report-public
54+ cp data/*.json backup/data/
55+ cp report/src/data/*.json backup/report-src-data/
56+ cp report/public/runtime-support.csv backup/report-public/ || true
5357
5458 - name : Generate data
5559 run : |
6266 run : |
6367 echo "Checking for differences between generated and committed data..."
6468
65- # Compare each data file
69+ # Compare each data file (note: timestamp.json is excluded as it changes on every generation)
6670 files=(
6771 "data/baseline.json"
6872 "data/bun.json"
@@ -71,14 +75,26 @@ jobs:
7175 "data/node-22.json"
7276 "data/node-24.json"
7377 "data/workerd.json"
78+ "report/src/data/table-data.json"
79+ "report/src/data/versionMap.json"
80+ "report/public/runtime-support.csv"
7481 )
7582
7683 has_diff=false
7784 changed_files=""
7885 for file in "${files[@]}"; do
79- if ! diff -u "data-backup/$(basename $file)" "$file" > /dev/null 2>&1; then
86+ backup_path="backup"
87+ if [[ "$file" == data/* ]]; then
88+ backup_file="$backup_path/data/$(basename $file)"
89+ elif [[ "$file" == report/src/data/* ]]; then
90+ backup_file="$backup_path/report-src-data/$(basename $file)"
91+ elif [[ "$file" == report/public/* ]]; then
92+ backup_file="$backup_path/report-public/$(basename $file)"
93+ fi
94+
95+ if ! diff -u "$backup_file" "$file" > /dev/null 2>&1; then
8096 echo "❌ $file has changed!"
81- changed_files="$changed_files- $file\\ n"
97+ changed_files="$changed_files- $file\n"
8298 has_diff=true
8399 else
84100 echo "✅ $file is up to date"
@@ -103,11 +119,16 @@ jobs:
103119 uses : actions/upload-artifact@v4
104120 with :
105121 name : generated-data
106- path : data/
122+ path : |
123+ data/
124+ report/src/data/table-data.json
125+ report/src/data/versionMap.json
126+ report/src/data/timestamp.json
127+ report/public/runtime-support.csv
107128 retention-days : 7
108129
109130 - name : Update PR comment
110- if : github.event_name == 'pull_request'
131+ if : always() && github.event_name == 'pull_request'
111132 uses : actions/github-script@v7
112133 with :
113134 script : |
@@ -153,7 +174,7 @@ jobs:
153174 body = `<!-- check-data-comment -->
154175 ## ✅ Generated Data Up to Date
155176
156- All data files in \`data/\` match the generated output.`;
177+ All generated data files match the committed output.`;
157178 }
158179
159180 if (botComment) {
0 commit comments