GitHub Action for running Stroppy database benchmarks in CI/CD pipelines.
Stroppy is a command-line tool built on k6/xk6 for database load testing. This action installs Stroppy, runs benchmarks (custom scripts or built-in presets), and uploads results as workflow artifacts.
- uses: stroppy-io/stroppy-action@main
with:
preset: tpcb
driver-url: ${{ secrets.DATABASE_URL }}
duration: 10m
vus: 4
scale-factor: 10- uses: stroppy-io/stroppy-action@main
with:
script: ./benchmarks/my-bench.ts
sql-file: ./benchmarks/schema.sql
driver-url: ${{ secrets.DATABASE_URL }}
duration: 30m
vus: 8- uses: stroppy-io/stroppy-action@main
with:
version: v1.2.3
preset: simple
driver-url: ${{ secrets.DATABASE_URL }}- uses: stroppy-io/stroppy-action@main
id: bench
with:
preset: tpcb
driver-url: ${{ secrets.DATABASE_URL }}
- run: echo "Benchmark exited with code ${{ steps.bench.outputs.exit-code }}"| Input | Required | Default | Description |
|---|---|---|---|
version |
No | latest |
Stroppy release tag (e.g. v1.2.3) or latest |
script |
No | '' |
Path to a custom .ts benchmark script (mutually exclusive with preset) |
sql-file |
No | '' |
Path to a .sql file (only used with script) |
preset |
No | '' |
Built-in preset: tpcb, tpcc, tpcds, simple, execute_sql |
driver-url |
Yes | Database connection URL | |
scale-factor |
No | '' |
Scale factor for the workload |
duration |
No | '' |
Test duration (e.g. 1h, 30m) |
vus |
No | '' |
Number of virtual users |
log-level |
No | info |
Log level: debug, info, warn, error |
k6-args |
No | '' |
Additional k6 CLI arguments |
artifact-name |
No | stroppy-results |
Name for the uploaded results artifact |
Either script or preset must be provided (but not both).
| Output | Description |
|---|---|
exit-code |
Exit code from the Stroppy run |
results-file |
Path to the JSON results file |
artifact-id |
ID of the uploaded artifact |
- Install — Downloads the Stroppy binary from GitHub Releases (with tool-cache for fast re-runs).
- Run — Executes the benchmark:
- Custom script:
stroppy run <script> [sql] -- <k6-args> - Preset: generates files via
stroppy gen, then runs them.
- Custom script:
- Collect — Sets outputs and uploads the JSON results file as a workflow artifact.