Skip to content

feat: add lifecycle E2E test#19

Merged
AquiGorka merged 3 commits intomainfrom
feat/lifecycle-e2e
Mar 18, 2026
Merged

feat: add lifecycle E2E test#19
AquiGorka merged 3 commits intomainfrom
feat/lifecycle-e2e

Conversation

@AquiGorka
Copy link
Copy Markdown
Contributor

Summary

  • Adds a full lifecycle E2E test that validates the entire Moonlight protocol: deploy council → deploy channel → register PP → deposit → send → withdraw → remove PP
  • Contract deployment is programmatic (stellar-sdk), replacing setup.sh for this flow
  • Reuses existing e2e/ modules for the payment flow (auth, deposit, send, receive, withdraw)
  • Docker-compose setup for CI with isolated network (stellar, db, setup, provider, test-runner)
  • Reusable workflow (lifecycle-reusable.yml) matching the same interface as e2e-reusable.yml

Local usage

cd lifecycle && deno task lifecycle

CI usage

Called by soroban-core and provider-platform PR workflows (see companion PRs).

Test plan

  • deno task lifecycle passes locally against a running Stellar node (~90s)
  • Docker-compose flow validates in CI once this lands and callers reference it

Programmatic test covering the complete Moonlight protocol lifecycle:
1. Deploy Council (Channel Auth contract)
2. Deploy Channel (Privacy Channel, linked to council + SAC)
3. Register Privacy Provider (add_provider)
4. Deposit, Send, Withdraw (reuses existing e2e/ modules)
5. Remove Privacy Provider (remove_provider)

Deploys contracts via stellar-sdk (replaces setup.sh for this flow),
starts a provider-platform from source, and validates governance
events when the node supports it.

Run locally: cd lifecycle && deno task lifecycle
Splits the lifecycle test into setup and test phases for docker-compose:
- ci-setup.ts: deploys contracts, registers provider, writes config
  to shared volume (provider.env + contracts.env)
- ci-test.ts: reads config, runs payment flow, removes provider
- docker-compose.yml: stellar, db, setup, provider, test-runner
  services with isolated network and health-check ordering

Each compose run gets its own network, avoiding conflicts with the
existing e2e/ docker-compose.
Reusable workflow (workflow_call) for the lifecycle E2E test, matching
the same input/secret interface as e2e-reusable.yml:
- contracts_artifact / contracts_version for WASMs
- provider_version / provider_image_override for provider image
- E2E_TRIGGER_TOKEN secret

Uses docker compose in lifecycle/ directory. Caller repos add a
lifecycle job alongside the existing e2e job.
@AquiGorka AquiGorka merged commit 571a291 into main Mar 18, 2026
1 check passed
@AquiGorka AquiGorka deleted the feat/lifecycle-e2e branch March 18, 2026 19:16
@AquiGorka AquiGorka restored the feat/lifecycle-e2e branch March 18, 2026 19:29
@AquiGorka AquiGorka deleted the feat/lifecycle-e2e branch March 18, 2026 19:30
AquiGorka added a commit to Moonlight-Protocol/provider-platform that referenced this pull request Mar 18, 2026
## Summary
- Adds a `lifecycle` job to the PR workflow, running in parallel with
the existing `e2e` job
- Both depend on the `build` job's PR Docker image
(`provider_image_override`)
- The lifecycle test deploys contracts programmatically and validates
the full protocol lifecycle using the PR-built provider-platform image

## Dependencies
- Moonlight-Protocol/local-dev#19 must be merged first (provides the
reusable workflow)

## Test plan
- [ ] Lifecycle job runs successfully once the local-dev PR lands
AquiGorka added a commit to Moonlight-Protocol/soroban-core that referenced this pull request Mar 18, 2026
## Summary
- Adds a `lifecycle` job to the PR workflow, running in parallel with
the existing `e2e` job
- Both depend on the `build` job's `contract-wasms` artifact
- The lifecycle test deploys contracts programmatically and validates
the full protocol lifecycle

## Dependencies
- Moonlight-Protocol/local-dev#19 must be merged first (provides the
reusable workflow)

## Test plan
- [ ] Lifecycle job runs successfully once the local-dev PR lands
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