Skip to content

Commit c5ef8cf

Browse files
committed
Use GitHub workspace paths in perf workflow
1 parent 87d4525 commit c5ef8cf

File tree

1 file changed

+8
-8
lines changed

1 file changed

+8
-8
lines changed

.github/workflows/performance-regressions.yml

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@ jobs:
5757
shell: bash
5858
run: |
5959
set -o pipefail
60-
cargo run --release -p cap-test -- suite performance --recording-path performance-fixtures/reference-recording.cap --duration 8 --output "$PERFORMANCE_RESULTS_PATH" 2>&1 | tee "$PERFORMANCE_LOG_PATH"
60+
cargo run --release -p cap-test -- suite performance --recording-path "${{ github.workspace }}/performance-fixtures/reference-recording.cap" --duration 8 --output "${{ github.workspace }}/${PERFORMANCE_RESULTS_PATH}" 2>&1 | tee "${{ github.workspace }}/${PERFORMANCE_LOG_PATH}"
6161
6262
- name: Upload results
6363
if: always()
@@ -77,8 +77,8 @@ jobs:
7777
if: always()
7878
shell: bash
7979
run: |
80-
if [ -f "$PERFORMANCE_RESULTS_PATH" ]; then
81-
cat "$PERFORMANCE_RESULTS_PATH"
80+
if [ -f "${{ github.workspace }}/${PERFORMANCE_RESULTS_PATH}" ]; then
81+
cat "${{ github.workspace }}/${PERFORMANCE_RESULTS_PATH}"
8282
else
8383
echo "$PERFORMANCE_RESULTS_PATH not found"
8484
fi
@@ -87,13 +87,13 @@ jobs:
8787
if: always()
8888
shell: bash
8989
run: |
90-
if [ -f "$PERFORMANCE_RESULTS_PATH" ]; then
91-
target/release/cap-test report "$PERFORMANCE_RESULTS_PATH"
92-
node -e 'const fs = require("fs"); const p = process.env.PERFORMANCE_RESULTS_PATH; const r = JSON.parse(fs.readFileSync(p, "utf8")); process.exit((r.summary.failed || r.summary.errors) ? 1 : 0);'
90+
if [ -f "${{ github.workspace }}/${PERFORMANCE_RESULTS_PATH}" ]; then
91+
target/release/cap-test report "${{ github.workspace }}/${PERFORMANCE_RESULTS_PATH}"
92+
node -e 'const fs = require("fs"); const p = process.env.GITHUB_WORKSPACE + "/" + process.env.PERFORMANCE_RESULTS_PATH; const r = JSON.parse(fs.readFileSync(p, "utf8")); process.exit((r.summary.failed || r.summary.errors) ? 1 : 0);'
9393
else
9494
echo "$PERFORMANCE_RESULTS_PATH not found"
95-
if [ -f "$PERFORMANCE_LOG_PATH" ]; then
96-
cat "$PERFORMANCE_LOG_PATH"
95+
if [ -f "${{ github.workspace }}/${PERFORMANCE_LOG_PATH}" ]; then
96+
cat "${{ github.workspace }}/${PERFORMANCE_LOG_PATH}"
9797
fi
9898
exit 1
9999
fi

0 commit comments

Comments
 (0)