1+ name : Run Performance Report
2+ description : Downloads artifacts, generates performance report, and posts results
3+ inputs :
4+ artifacts-pattern :
5+ description : ' Pattern for performance artifacts to download'
6+ required : false
7+ default : ' performance-results-*'
8+ artifacts-path :
9+ description : ' Path where artifacts should be downloaded'
10+ required : false
11+ default : ' systemtest/target/performance-artifacts'
12+ runs :
13+ using : composite
14+ steps :
15+ - name : Download performance results
16+ uses : actions/download-artifact@v4
17+ with :
18+ pattern : ${{ inputs.artifacts-pattern }}
19+ path : ${{ inputs.artifacts-path }}
20+ # Each artifact gets its own subdirectory (not merged) to preserve arch-specific results
21+
22+ - name : List downloaded artifacts
23+ shell : bash
24+ run : |
25+ echo "Downloaded artifacts:"
26+ find "${{ inputs.artifacts-path }}" -type f | head -n 20
27+
28+ - name : Generate performance report
29+ id : generate_report
30+ uses : actions/github-script@v7
31+ env :
32+ PERF_DIR : ${{ inputs.artifacts-path }}
33+ with :
34+ github-token : ${{ github.token }}
35+ script : |
36+ const { generatePerformanceReport } = require('./.github/actions/systemtests/run-perf-report/generate-report.js');
37+ const perfDir = process.env.PERF_DIR || 'systemtest/target/performance';
38+ const result = generatePerformanceReport(perfDir, core);
39+ core.setOutput('has_results', result.has_results);
40+ core.setOutput('summary', result.summary);
41+ core.setOutput('timestamp', result.timestamp);
42+
43+ - name : Add performance report comment
44+ if : ${{ steps.generate_report.outputs.has_results == 'true' }}
45+ uses : ./.github/actions/utils/add-comment
46+ with :
47+ commentMessage : |
48+ ${{ steps.generate_report.outputs.summary }}
49+
50+ - name : Add performance report to job summary
51+ if : ${{ steps.generate_report.outputs.has_results == 'true' }}
52+ shell : bash
53+ env :
54+ SUMMARY_CONTENT : ${{ steps.generate_report.outputs.summary }}
55+ run : |
56+ echo "$SUMMARY_CONTENT" >> "$GITHUB_STEP_SUMMARY"
57+
58+ - name : No results warning
59+ if : ${{ steps.generate_report.outputs.has_results == 'false' }}
60+ shell : bash
61+ env :
62+ WARNING_MESSAGE : " No performance results found in artifacts"
63+ run : |
64+ echo "::warning::$WARNING_MESSAGE"
0 commit comments