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

Fix end-to-end tests in CI #3746

Merged
merged 2 commits into from
May 23, 2024
Merged

Fix end-to-end tests in CI #3746

merged 2 commits into from
May 23, 2024

Conversation

tillprochaska
Copy link
Contributor

@tillprochaska tillprochaska commented May 23, 2024

The docker compose run command doesn’t support the --build-arg argument. Depending on the Docker Compose version installed, using the --build-arg argument would either exit with an error code or simply print the command help.

To achieve the desired outcome, we can first build the image with the build argument, then start the container. This has the additional advantage of separating the build logs from the logs of the actual command execution in the GitHub Actions UI.

Tested these changes: https://github.com/alephdata/aleph/actions/runs/9205541034/job/25321430312

The `docker compose run` command doesn’t support the `--build-arg` argument. Depending on the Docker Compose version installed, using the `--build-arg` argument would either exit with an error code or simply print the command help.

To achieve the desired outcome, we can first build the image with the build argument, then start the container. This has the additional advantage of separating the build logs from the logs of the actual command execution in the GitHub Actions UI.
This separates logs related to pulling/starting service containers from the logs of the actual test command.
@tillprochaska tillprochaska force-pushed the fix/e2e-tests branch 2 times, most recently from fe47d61 to b064ba3 Compare May 23, 2024 09:32
@tillprochaska tillprochaska changed the title Fix/e2e tests Fix end-to-end tests in CI May 23, 2024
@tillprochaska tillprochaska marked this pull request as ready for review May 23, 2024 09:42
Copy link
Contributor

@stchris stchris left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice, thanks for this!

@tillprochaska tillprochaska merged commit 42dea7e into develop May 23, 2024
1 check passed
tillprochaska added a commit that referenced this pull request May 23, 2024
* Ensure that end-to-end test run in CI

The `docker compose run` command doesn’t support the `--build-arg` argument. Depending on the Docker Compose version installed, using the `--build-arg` argument would either exit with an error code or simply print the command help.

To achieve the desired outcome, we can first build the image with the build argument, then start the container. This has the additional advantage of separating the build logs from the logs of the actual command execution in the GitHub Actions UI.

* Pull and start services before running tests

This separates logs related to pulling/starting service containers from the logs of the actual test command.
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