|
14 | 14 | - macos-latest |
15 | 15 | - windows-latest |
16 | 16 | runs-on: ${{ matrix.runner }} |
| 17 | + env: |
| 18 | + PERFORMANCE_RESULTS_PATH: performance-results-${{ runner.os }}.json |
17 | 19 | steps: |
18 | 20 | - name: Checkout Cap |
19 | 21 | uses: actions/checkout@v4 |
@@ -48,32 +50,32 @@ jobs: |
48 | 50 | - name: Run performance suite |
49 | 51 | id: performance_suite |
50 | 52 | continue-on-error: true |
51 | | - run: cargo run --release -p cap-test -- suite performance --recording-path performance-fixtures/reference-recording.cap --duration 8 --output performance-results.json --gate |
| 53 | + run: cargo run --release -p cap-test -- suite performance --recording-path performance-fixtures/reference-recording.cap --duration 8 --output "$PERFORMANCE_RESULTS_PATH" --gate |
52 | 54 |
|
53 | 55 | - name: Upload results |
54 | 56 | if: always() |
55 | 57 | uses: actions/upload-artifact@v4 |
56 | 58 | with: |
57 | 59 | name: performance-results-${{ matrix.runner }} |
58 | | - path: performance-results.json |
| 60 | + path: ${{ env.PERFORMANCE_RESULTS_PATH }} |
59 | 61 |
|
60 | 62 | - name: Print results |
61 | 63 | if: always() |
62 | 64 | shell: bash |
63 | 65 | run: | |
64 | | - if [ -f performance-results.json ]; then |
65 | | - cat performance-results.json |
| 66 | + if [ -f "$PERFORMANCE_RESULTS_PATH" ]; then |
| 67 | + cat "$PERFORMANCE_RESULTS_PATH" |
66 | 68 | else |
67 | | - echo "performance-results.json not found" |
| 69 | + echo "$PERFORMANCE_RESULTS_PATH not found" |
68 | 70 | fi |
69 | 71 |
|
70 | 72 | - name: Enforce suite gate |
71 | 73 | if: always() && steps.performance_suite.outcome != 'success' |
72 | 74 | shell: bash |
73 | 75 | run: | |
74 | | - if [ -f performance-results.json ]; then |
75 | | - target/release/cap-test report performance-results.json |
| 76 | + if [ -f "$PERFORMANCE_RESULTS_PATH" ]; then |
| 77 | + target/release/cap-test report "$PERFORMANCE_RESULTS_PATH" |
76 | 78 | else |
77 | | - echo "performance-results.json not found" |
| 79 | + echo "$PERFORMANCE_RESULTS_PATH not found" |
78 | 80 | fi |
79 | 81 | exit 1 |
0 commit comments