Skip to content

Commit 272f432

Browse files
committed
fix(ci): persist k6 summary.json with host uid on bind mount
The grafana/k6 image is non-root, so handleSummary could not write tests/k6/summary.json and the artifact upload warned with no files.
1 parent 4b94ebc commit 272f432

1 file changed

Lines changed: 5 additions & 0 deletions

File tree

.github/workflows/load-test.yml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -75,12 +75,17 @@ jobs:
7575
# is not the compose-published API. Use host networking on
7676
# ubuntu-latest so BASE_URL=http://localhost:8080 reaches the stack.
7777
run: |
78+
# k6 image is non-root; make the bind-mount writable so
79+
# handleSummary / --summary-export can persist summary.json.
80+
chmod a+w tests/k6
7881
docker run --rm --network host \
7982
-e BASE_URL=http://localhost:8080 \
8083
-e SCENARIO="${SCENARIO}" \
8184
-v "${GITHUB_WORKSPACE}/tests/k6:/scripts" \
8285
-w /scripts \
86+
--user "$(id -u):$(id -g)" \
8387
grafana/k6:0.54.0 run /scripts/api_smoke.js
88+
test -f tests/k6/summary.json
8489
env:
8590
SCENARIO: ${{ github.event.inputs.scenario || 'smoke' }}
8691

0 commit comments

Comments
 (0)