|
1 | 1 | name: ci-performance |
2 | 2 | on: |
3 | | - pull_request_target: |
| 3 | + pull_request: |
4 | 4 | branches: |
5 | 5 | - alpha |
6 | 6 | - beta |
|
17 | 17 |
|
18 | 18 | permissions: |
19 | 19 | contents: read |
20 | | - pull-requests: write |
21 | | - issues: write |
22 | 20 |
|
23 | 21 | jobs: |
24 | 22 | performance-check: |
@@ -172,23 +170,6 @@ jobs: |
172 | 170 | echo "baseline.json size: $(wc -c < baseline.json) bytes" |
173 | 171 | echo "pr.json size: $(wc -c < pr.json) bytes" |
174 | 172 |
|
175 | | - - name: Store benchmark result (PR) |
176 | | - uses: benchmark-action/github-action-benchmark@v1 |
177 | | - if: github.event_name == 'pull_request' && hashFiles('pr.json') != '' |
178 | | - continue-on-error: true |
179 | | - with: |
180 | | - name: Parse Server Performance |
181 | | - tool: 'customSmallerIsBetter' |
182 | | - output-file-path: pr.json |
183 | | - github-token: ${{ secrets.GITHUB_TOKEN }} |
184 | | - auto-push: false |
185 | | - save-data-file: false |
186 | | - alert-threshold: '110%' |
187 | | - comment-on-alert: true |
188 | | - fail-on-alert: false |
189 | | - alert-comment-cc-users: '@parse-community/maintainers' |
190 | | - summary-always: true |
191 | | - |
192 | 173 | - name: Compare benchmark results |
193 | 174 | id: compare |
194 | 175 | run: | |
@@ -278,43 +259,6 @@ jobs: |
278 | 259 | path: comparison.md |
279 | 260 | retention-days: 30 |
280 | 261 |
|
281 | | - - name: Prepare comment body |
282 | | - if: github.event_name == 'pull_request' |
283 | | - run: | |
284 | | - echo "## Performance Impact Report" > comment.md |
285 | | - echo "" >> comment.md |
286 | | - if [ -f comparison.md ]; then |
287 | | - cat comparison.md >> comment.md |
288 | | - else |
289 | | - echo "⚠️ Could not generate performance comparison." >> comment.md |
290 | | - fi |
291 | | - echo "" >> comment.md |
292 | | - echo "<details>" >> comment.md |
293 | | - echo "<summary>📊 View detailed results</summary>" >> comment.md |
294 | | - echo "" >> comment.md |
295 | | - echo "### Baseline Results" >> comment.md |
296 | | - echo "\`\`\`json" >> comment.md |
297 | | - cat baseline.json >> comment.md |
298 | | - echo "\`\`\`" >> comment.md |
299 | | - echo "" >> comment.md |
300 | | - echo "### PR Results" >> comment.md |
301 | | - echo "\`\`\`json" >> comment.md |
302 | | - cat pr.json >> comment.md |
303 | | - echo "\`\`\`" >> comment.md |
304 | | - echo "" >> comment.md |
305 | | - echo "</details>" >> comment.md |
306 | | - echo "" >> comment.md |
307 | | - echo "> **Note:** Thresholds: ⚠️ >25%, ❌ >50%." >> comment.md |
308 | | -
|
309 | | - - name: Comment PR with results |
310 | | - if: github.event_name == 'pull_request' |
311 | | - uses: thollander/actions-comment-pull-request@v2 |
312 | | - continue-on-error: true |
313 | | - with: |
314 | | - filePath: comment.md |
315 | | - comment_tag: performance-benchmark |
316 | | - mode: recreate |
317 | | - |
318 | 262 | - name: Generate job summary |
319 | 263 | if: always() |
320 | 264 | run: | |
|
0 commit comments