Skip to content

Add coverage threshold enforcement and e2e tests against Stellar testnet in CI #243

@Jagadeeshftw

Description

@Jagadeeshftw

Description

The CI pipeline runs vitest but enforces no minimum coverage threshold, allowing coverage to regress silently. Additionally, there are no end-to-end tests that exercise the full stack (Express API → PostgreSQL → Stellar testnet RPC). A coverage threshold of 80% lines/branches must be added to vitest config, and a separate CI workflow must run e2e tests against the Stellar Futurenet/Testnet on scheduled nightly runs.

Requirements and context

  • Configure vitest.config.ts with coverage.thresholds set to 80% lines, functions, branches, and statements
  • Add tests/e2e/streams.e2e.test.ts using supertest against a running server connected to testnet Stellar RPC
  • Create .github/workflows/e2e.yml as a nightly scheduled workflow with testnet credentials injected from GitHub Secrets
  • Must be secure, tested, and documented
  • Should be efficient and easy to review

Suggested execution

Fork the repo and create a branch

git checkout -b feature/ci-coverage-threshold-e2e

Implement changes

  • Update/Write: vitest.config.ts — add coverage thresholds
  • Update/Write: tests/e2e/streams.e2e.test.ts — full stream lifecycle e2e test
  • Update/Write: .github/workflows/e2e.yml — nightly e2e workflow with testnet config
  • Add documentation: docs/testing.md — document e2e test setup and required secrets
  • Include clear code comments and types
  • Validate security assumptions

Test and commit

  • Run tests: pnpm test (or pnpm test:coverage)
  • Cover edge cases: coverage threshold breach fails build, e2e test retries on testnet timeout, secrets not leaked in CI logs
  • Include test output and security notes

Example commit message

ci: add 80% coverage threshold and nightly Stellar testnet e2e tests

Guidelines

  • Minimum 95 percent test coverage
  • Clear documentation
  • Timeframe: 96 hours

Metadata

Metadata

Assignees

No one assigned

    Labels

    Stellar WaveIssues in the Stellar wave programbackendBackend service workdevopsCI / Docker / deploytestingTests and coverage

    Type

    No fields configured for Task.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions