Performance CLI · v2.0
spanline-cli
Run k6 from your laptop or CI. Results land in your Spanline workspace — with optional Kubernetes evidence via Kite.
Detecting platform…
name: Performance
on:
push:
branches: [main]
pull_request:
workflow_dispatch:
jobs:
k6:
runs-on: ubuntu-latest
env:
SPANLINE_TOKEN: ${{ secrets.SPANLINE_TOKEN }}
SPANLINE_WORKSPACE: ${{ secrets.SPANLINE_WORKSPACE }}
steps:
- uses: actions/checkout@v4
- name: Install spanline-cli
run: |
curl -fsSL \
https://dl.spanline.dev/cli/2.0/spanline-cli-linux-amd64 \
-o /usr/local/bin/spanline-cli
chmod +x /usr/local/bin/spanline-cli
- name: Run scenario
run: |
spanline-cli test run \
--scenario-id ${{ vars.SPANLINE_SCENARIO_ID }} \
--env staging \
--name "ci-${{ github.run_number }}" \
--ci \
--upload-artifacts
Install
Binary from dl.spanline.dev · SHA256SUMS
Login
auth login --token … from Account → API tokens
Run
test run — k6 + upload to your workspace
Capabilities
Built for Performance CI
Auth, run k6, stream live metrics, upload logs. With a Kite connection, also attach Kubernetes Deployment and pod snapshots before and after the test.
-
Live metrics
k6 progress and
--out jsonstream while the run is in flight. -
Abort from UI
Respects
abortRequestedso you can stop CI from the workspace. -
Environments
Scenario env vars plus
--env/KEY=VALoverrides. -
Artifacts
--upload-artifactszips stdout, stderr,summary.json, andjob.log. - Kubernetes via Kite Before/after Deployment and pod CPU/RAM via Kite — not kubeconfig.
-
Versions & matrix
Pin
--version-id; export collection matrix as JSON or CSV. -
k6 auto-install
Downloads a pinned k6 into cache unless
--no-install-k6. -
CI mode
--cifor non-interactive runs — exit non-zero when thresholds fail.
Commands
Auth
-
spanline-cli auth login --token …Laptop once · CI: skip, use
SPANLINE_TOKEN -
spanline-cli auth workspace listList workspaces for the token ·
*= active -
spanline-cli auth workspace use <id>Set default workspace · or
SPANLINE_WORKSPACE/--workspace
Test
-
spanline-cli test run --scenario-id sc_… --env stagingWorkspace scenario
-
spanline-cli test run script.js --name smokeLocal k6 script · upload metrics/summary (not the .js)
-
spanline-cli test run --scenario-id sc_… --infra-ref ns/appk6 + Kite before/after
-
spanline-cli test collection-run --id cr_… --ciExisting collection run · Kite if linked
-
spanline-cli test collection-run --collection-id col_…Create run from collection, then execute
-
spanline-cli test watch --once --upload-artifactsWebhook-handed jobs
-
spanline-cli test matrix --id cr_… -o out.csvExport matrix CSV/JSON