Skip to content

feat: k6 prod post-deploy testing with pre-funded accounts (CPL-178)#258

Merged
Garandor merged 10 commits intonextfrom
cl4wb0t/k6-prod-testing
Apr 1, 2026
Merged

feat: k6 prod post-deploy testing with pre-funded accounts (CPL-178)#258
Garandor merged 10 commits intonextfrom
cl4wb0t/k6-prod-testing

Conversation

@Garandor
Copy link
Copy Markdown
Contributor

@Garandor Garandor commented Apr 1, 2026

Summary

  • Enable k6 smoke + correctness tests on production using pre-funded accounts injected via K6_ACCOUNTS_PROD_JSON GitHub secret
  • Skip Stripe sandbox top-up on prod (K6_ENV=prod) since pm_card_visa doesn't work with live keys
  • Add k6-prod-test.yml workflow for manually running the prod test suite without triggering a deployment
  • Wire prod accounts through deploy-prod-2-execute.yml so tests run automatically after prod deploys
  • Add NETWORK=prod support to the k6 justfile

Pre-requisite

Create and fund account(s) on prod, then store the JSON as GitHub secret K6_ACCOUNTS_PROD_JSON in format:

{"accounts": [{"apiKey": "...", "walletAddress": "...", "usageApiKey": "..."}]}

Test plan

  • Set K6_ACCOUNTS_PROD_JSON secret in GitHub
  • Trigger "k6 Prod Test (manual)" workflow and verify smoke + correctness pass
  • Verify staging deploys still run k6 tests with default (sandbox) behavior
  • Verify prod deploy (deploy-prod-2-execute) passes k6 tests with pre-funded accounts

🤖 Generated with Claude Code

…L-178)

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@Garandor Garandor requested a review from a team April 1, 2026 15:33
Comment thread .github/workflows/k6-correctness.yml Outdated
Garandor and others added 9 commits April 1, 2026 10:41
The job-level env var was renamed from ACCOUNTS_FILE to K6_ACCOUNTS_FILE,
but the step-level fallback expressions still referenced env.ACCOUNTS_FILE.
This caused staging/dev runs (without the accounts_json secret) to resolve
to an empty string instead of the branch-appropriate accounts file.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Hardcode api_root_url and attestation_url instead of reading from
deploy-context.json, consistent with the other jobs in this workflow.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Replace hardcoded api.chipotle.litprotocol.com with the DOMAIN_PROD
GitHub repository variable for DRY configuration.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
…rkflow

Updated the input name and all callers (deploy-prod-2-execute, deploy-staging).

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Renamed 5 workflow files that are triggered exclusively via
workflow_dispatch to make their manual nature clear from the filename:
- contract-upgrade-prod-1-propose.yml
- contract-upgrade-prod-2-verify.yml
- contract-upgrade.yml
- deploy-prod-2-execute.yml
- k6-prod-test.yml

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
…aming

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@Garandor Garandor merged commit d7b1d20 into next Apr 1, 2026
10 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant