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
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
vitest.config.tswithcoverage.thresholdsset to 80% lines, functions, branches, and statementstests/e2e/streams.e2e.test.tsusingsupertestagainst a running server connected to testnet Stellar RPC.github/workflows/e2e.ymlas a nightly scheduled workflow with testnet credentials injected from GitHub SecretsSuggested execution
Fork the repo and create a branch
Implement changes
vitest.config.ts— add coverage thresholdstests/e2e/streams.e2e.test.ts— full stream lifecycle e2e test.github/workflows/e2e.yml— nightly e2e workflow with testnet configdocs/testing.md— document e2e test setup and required secretsTest and commit
pnpm test(orpnpm test:coverage)Example commit message
Guidelines