Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

🪚 Adding E2E test infrastructure #23

Merged
merged 18 commits into from
Nov 17, 2023
Merged

Conversation

janjakubnanista
Copy link
Contributor

@janjakubnanista janjakubnanista commented Nov 17, 2023

In this PR

Adding container-based E2E testing infrastructure. This consists of:

  • Dockerfile that can build this project. If we were not using yarn everywhere I would definitely suggest pnpm because yarn is not capable of installing dependencies based on just the yarn.lock file. This means the whole codebase needs to be copied to the image before yarn install is ran which in turn means that there is no caching of yarn install. Pathetic.
  • docker-compose.templates.yaml files that define reusable services. The idea here is to write as little code as possible because who likes code I don't so we'll reuse everything we can
  • docker-compose.yaml files for the actual setups

How does it all work together? you might ask, knowing you already.

  1. We spin up a bunch of hardhat node processes - see packages/ua-utils-test-v2/docker-compose.yaml
  2. Once they are started, we deploy EndpointV2 to them. This is done using an ordinary hardhat deploy script which we'll need to expand with the endpoint configuration - see services/bootstrap in packages/ua-utils-test-v2/dcoker-compose.yaml
  3. Once we have deployed everything, we start the tests - see services/test in packages/ua-utils-test-v2/dcoker-compose.yaml
  4. Once the tests are done, we exit

@janjakubnanista janjakubnanista marked this pull request as ready for review November 17, 2023 00:39
@janjakubnanista janjakubnanista merged commit 6db10e9 into main Nov 17, 2023
1 check passed
@janjakubnanista janjakubnanista deleted the ua-utils-structure-003 branch November 17, 2023 01:35
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.

2 participants