Repository navigation
Conversation
Run a k6 script from the consuming repo against a target URL exported as BASE_URL with a checksum-verified k6 binary. The script's thresholds are the gate: k6 exits 99 when one is crossed and the step fails after the summary is rendered. summary.py turns the --summary-export JSON into a job summary (requests, rate, p95 and max latency, error rate, checks, every threshold) and step outputs. load-test.yml wraps the composite and keeps the summary JSON as an artefact. docs/examples/k6/stac-search.js is a STAC collections and search script with thresholds. CI checks summary.py against recorded summaries, then runs the composite against a local static server once passing and once with an impossible p95 threshold that must fail. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01NPH9145e4gFo6bmXvMgBoF
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Closes #74. From
main, no stack.What
.github/actions/k6: k62.3.0tarball verified againstk6-v2.3.0-checksums.txt, installed to$RUNNER_TEMP. Inputsscript,target-url(exported asBASE_URL),vus,duration,extra-args,summary-file.k6 run --summary-export; exit 99 (thresholds crossed) is carried to a final failing step after the summary is rendered, any other exit fails immediately.summary.py(stdlib) renders requests, requests per second, p95 and max latency, error rate, checks and a pass/fail row per threshold into the job summary and sets outputsthresholds-failed,thresholds-total,p95-ms,error-rate,requests. Usage reporting off (K6_NO_USAGE_REPORT).load-test.yml: inputs from the issue plusextra-argsandactions-ref;k6-summaryartefact always uploaded; outputsp95-ms,error-rate.docs/examples/k6/stac-search.js:GET /collectionsandPOST /searchwith a bbox and limit, thresholdsp(95)<800,rate<0.01,checks rate>0.99.k6row indocs/approved-actions.md.k6job:summary.pyfixtures, then the composite againstpython3 -m http.serveron the runner (no egress), once passing (asserts zero crossed thresholds and requests made) and once with--env P95_MS=0.001expecting failure with exactly one crossed threshold.Tests
tests/k6/run.shwith summaries recorded from real k6 2.3.0 runs (pass and threshold crossed): outputs, summary rows, annotation, exit codes 0/1/2. In the--summary-exportformat a threshold entry oftruemeans crossed; the script reads it that way.🤖 Generated with Claude Code
https://claude.ai/code/session_01NPH9145e4gFo6bmXvMgBoF