https://github.com/skorfmann/wormhole
Stop worrying about manually crafting a parallel CI pipeline and start folding execution time by forming wormholes in your CI workflows 🚀
https://github.com/skorfmann/wormhole
cdktf ci jest jest-runner lambda serverless terraform
Last synced: 7 months ago
JSON representation
Stop worrying about manually crafting a parallel CI pipeline and start folding execution time by forming wormholes in your CI workflows 🚀
- Host: GitHub
- URL: https://github.com/skorfmann/wormhole
- Owner: skorfmann
- Created: 2021-03-15T09:11:02.000Z (over 4 years ago)
- Default Branch: main
- Last Pushed: 2021-03-18T07:11:43.000Z (over 4 years ago)
- Last Synced: 2025-02-14T03:51:07.433Z (8 months ago)
- Topics: cdktf, ci, jest, jest-runner, lambda, serverless, terraform
- Language: TypeScript
- Homepage:
- Size: 3.5 MB
- Stars: 2
- Watchers: 3
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Wormhole CI
Stop worrying about manually crafting a parallel CI pipeline and start folding execution time by forming wormholes in your CI workflows 🚀

## Components
- [Terraform CDK](https://cdk.tf)
- [AWS Lambda Docker Runtime](https://docs.aws.amazon.com/lambda/latest/dg/lambda-images.html)
- [Jest as a Platform](https://www.youtube.com/watch?v=NtjyeojAOBs&ab_channel=ReactiveConf)## How does it work
Jest uses [workers](https://github.com/facebook/jest/tree/master/packages/jest-worker) to run parallel tests. It's essentially possible to run each test file on its own worker. That's exactly what we're doing here. However, rather than running the test locally, the worker calls out to Lambda function and reports the result back to the Jest process.

## StatusThis is a proof of concept at this point. The goal is to drastically reduce the run time of integration test pipelines without sacrificing developer experience.
### Things to figure out
- Reduce deployment time (biggest gain is likely correlated with smaller Docker images)
- Local EFS mount, rather than code deployments for local testing (needs VPN or a proxy)
- Alternatively, use a remote container for VS code which could easily mount EFS
- Handle test specific settings / runners (e.g. a specific Docker image for a test / test group)
- Is there another way of splitting tests than files? (patterns maybe)
### Alternative runnersIt would be great to support more runner types. This would likely enable Windows and Mac builds as well.
- Use Fargate as runner
- Use Google Cloud run as runner
- Use Azure Functions as runner
- Use Azure App Service as runner
## UsageMake sure to have valid AWS credentials in your env.
```
yarn install
yarn build
cd packages/lambda
cdktf deploy --auto-approve
cd ../../examples/terraform
yarn test
```