datahaven/.github/workflows
Facundo Farall 9b311e00ef
test: 🏗️ Setup e2e testing framework (#104)
## Implement E2E Testing Framework with Isolated Networks

### Summary
Refactors the existing E2E testing infrastructure to provide isolated
test environments with parallel execution support. Each test suite now
runs in its own network namespace, preventing resource conflicts.

### Key Changes
- **New Testing Framework** (`test/framework/`): Base classes for test
lifecycle management with automatic setup/teardown
- **Launcher Module** (`test/launcher/`): Extracted network
orchestration logic from CLI handlers for reusability
- **Parallel Execution**: Added `test-parallel.ts` script with
concurrency limits to prevent resource exhaustion
- **Test Isolation**: Each suite gets unique network IDs (format:
`suiteName-timestamp`) and Docker networks
- **Improved Test Organization**: Migrated tests to new framework,
deprecated old test structure

### Test Improvements
- Added 4 new test suites demonstrating framework usage. :
  - `contracts.test.ts` - Smart contract deployment/interaction
  - `datahaven-substrate.test.ts` - Substrate API operations  
  - `cross-chain.test.ts` - Snowbridge cross-chain messaging
  - `ethereum-basic.test.ts` - Ethereum network operations

> [!WARNING]
The test suites themselves are bad and shouldn't be consider examples of
good tests. They were AI generated just to test the concurrency of test
runners

### Documentation
- Added comprehensive framework overview (`E2E_FRAMEWORK_OVERVIEW.md`)
- Updated README with parallel testing commands
- Added test patterns and best practices

### Breaking Changes
- Old test suites moved to `e2e - DEPRECATED/` directory
- Test execution now requires extending `BaseTestSuite` class

### Testing
Run tests with: `bun test:e2e` or `bun test:e2e:parallel` (with
concurrency limits)

### TODO
- [ ] Implement good test examples.
- [ ] Implement useful test utils (like waiting for an event to show up
in DataHaven or Ethereum).
- [ ] Enforce tests with CI (currently cannot be done due to
intermittent error when sending a transaction with PAPI).

---------

Co-authored-by: Claude <noreply@anthropic.com>
Co-authored-by: undercover-cactus <lola@moonsonglabs.com>
2025-07-16 18:51:07 +02:00
..
actions ci: caching between run in the CI to make building faster (#114) 2025-07-14 14:48:20 +02:00
CI.yml ci: 👷 Add CI to check PAPI metadata (#107) 2025-06-19 19:12:04 -03:00
DOCKER-PROD.yml fix: 💚 Remove interruption of Docker image publishing CI in main (#100) 2025-06-16 12:31:36 -03:00
task-build-operator.yml ci: caching between run in the CI to make building faster (#114) 2025-07-14 14:48:20 +02:00
task-check-metadata.yml ci: 👷 Add CI to check PAPI metadata (#107) 2025-06-19 19:12:04 -03:00
task-docker.yml refactor: 🐳 Improve docker caching (again) (#86) 2025-05-27 16:14:15 +00:00
task-e2e.yml test: 🏗️ Setup e2e testing framework (#104) 2025-07-16 18:51:07 +02:00
task-foundry-tests.yml test: ️ CI Refactor (#59) 2025-05-06 20:20:02 +00:00
task-rust-lint.yml fix: 🐳 Improve Docker Caching (#66) 2025-05-13 09:12:32 +00:00
task-rust-tests.yml refactor: 🐳 Improve docker caching (again) (#86) 2025-05-27 16:14:15 +00:00
task-ts-build.yml test: New CLI functions (#84) 2025-05-22 20:02:12 +00:00
task-ts-lint.yml test: ️ CI Refactor (#59) 2025-05-06 20:20:02 +00:00
weekly-audit.yml test: ️ CI Refactor (#59) 2025-05-06 20:20:02 +00:00