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

Speed up e2e tests execution in CI by storing host frontend testable image in GHCR #547

Open
luzzif opened this issue Dec 21, 2023 · 0 comments
Labels
tech debt Technical details that should be reviewed in the future but that aren't prio now

Comments

@luzzif
Copy link
Contributor

luzzif commented Dec 21, 2023

The current e2e testing setup uses Synpress and a Dockerized setup to run tests in the CI Github workflow. Specifically, the host frontend along with all its dependencies is put in a Docker container that extends from synthetixio/docker-e2e and tests are executed in that context. Additionally, synthetixio/video is bootstrapped together with the tested app through Docker compose to offer the right environment for Synpress to run (it only works in headed mode, and synthetixio/video probably offers an in-memory X server instance through xfvb and that's about it).

In order to make building the dockerized app image faster, its build operation is currently done in a previous step using Docker Buildx and using layer caching through a Github Action cache, and then it's imported in the CI runner's Docker image registry in order to be used by the Docker Compose config that actually runs the tests. The above is used as an alternative to building the image each time directly within Docker Compose, in order to leverage Docker Buildx's caching, that is currently working fine.

The problem is that this approach is actually currently slower compared to the just-in-time non cached build. The slow part is in particular the local Docker image registry import operation that Docker Buildx does. Check out this issue for more details: docker/build-push-action#998.

As an alternative we could investigate pushing the built image to GHCR and then making Docker Compose pull it.

@luzzif luzzif added the tech debt Technical details that should be reviewed in the future but that aren't prio now label Dec 21, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
tech debt Technical details that should be reviewed in the future but that aren't prio now
Projects
None yet
Development

No branches or pull requests

1 participant