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

feat: ci using localnet image #237

Merged
merged 15 commits into from
Mar 20, 2025
Merged

feat: ci using localnet image #237

merged 15 commits into from
Mar 20, 2025

Conversation

smrz2001
Copy link
Contributor

@smrz2001 smrz2001 commented Mar 19, 2025

This PR adds plumbing to setup a localnet Docker container and run tests against it. A single sample test using the Recall CLI is included.

To be able to integrate with the SDK, we'll have to update the SDK (in a separate PR) to be able to use configuration from the environment.

The Dagger plumbing allows many other CI combinations to be integrated (e.g. bash scripts, or other test containers, etc.)

Closes #183.

@smrz2001 smrz2001 self-assigned this Mar 19, 2025
Signed-off-by: Mohsin Zaidi <[email protected]>
Signed-off-by: Mohsin Zaidi <[email protected]>
Signed-off-by: Mohsin Zaidi <[email protected]>
Signed-off-by: Mohsin Zaidi <[email protected]>
Signed-off-by: Mohsin Zaidi <[email protected]>
Signed-off-by: Mohsin Zaidi <[email protected]>
Signed-off-by: Mohsin Zaidi <[email protected]>
Signed-off-by: Mohsin Zaidi <[email protected]>
@smrz2001 smrz2001 requested review from joewagner and sam701 March 20, 2025 00:46
@smrz2001 smrz2001 marked this pull request as ready for review March 20, 2025 00:46
@smrz2001 smrz2001 requested a review from stbrody March 20, 2025 02:11
DOCKER_USERNAME: ${{ secrets.DOCKER_HUB_USERNAME }}
DOCKER_PASSWORD: ${{ secrets.DOCKER_HUB_PASSWORD }}
TEST_TARGET_NETWORK: localnet
RECALL_PRIVATE_KEY: "0xdbda1821b80551c9d65939329250298aa3472ba22feea921c0cf5d620ea67b97"
Copy link
Contributor

Choose a reason for hiding this comment

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

Do we want to generate a new private key every time? So that we avoid the situations when something works with aaa but fails with bbb.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Let's chat about this one. I'll need some guidance.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Created ticket #242

ci/main.go Outdated
WithExec([]string{
"mkdir", "-p", "/root/.config/recall",
}).
WithExec([]string{
Copy link
Contributor

Choose a reason for hiding this comment

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

nit: can we extract all *Exec calls into our own docker image?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Hmm, what do you mean by our own image in this context? Do you mean use the a base container with all the right tooling, and separate out the code that executes our specific commands? Or something else?

Copy link
Contributor

Choose a reason for hiding this comment

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

I thought maybe create our own image so that we do not need to run apt update and apt install on every test. But it's a minor one.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Created ticket #241

Signed-off-by: Mohsin Zaidi <[email protected]>
Signed-off-by: Mohsin Zaidi <[email protected]>
Copy link
Contributor

@sam701 sam701 left a comment

Choose a reason for hiding this comment

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

great work 🚀

Signed-off-by: Mohsin Zaidi <[email protected]>
@smrz2001 smrz2001 enabled auto-merge (squash) March 20, 2025 18:31
Signed-off-by: Mohsin Zaidi <[email protected]>
@smrz2001 smrz2001 merged commit 9643429 into main Mar 20, 2025
1 check passed
@smrz2001 smrz2001 deleted the feat/ci branch March 20, 2025 18:53
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.

github workflow that starts hermetic network
2 participants