-
Notifications
You must be signed in to change notification settings - Fork 32
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
CI: retrieve starknet devnet version from .env.devnet #372
CI: retrieve starknet devnet version from .env.devnet #372
Conversation
WalkthroughThe change in the Changes
Assessment against linked issues
Poem
Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media? TipsChatThere are 3 ways to chat with CodeRabbit:
Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments. CodeRabbit Commands (invoked as PR comments)
Additionally, you can add CodeRabbit Configration File (
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 1
Outside diff range and nitpick comments (1)
.github/workflows/ci.yaml (1)
62-62
: Using the dynamically retrievedstarknet-devnet
version in the Docker command is a good practice. Consider adding error handling for Docker commands to manage cases where the Docker image might not be available or fails to run.
- name: Retrieve starknet devnet version | ||
shell: bash | ||
run: | | ||
grep STARKNET_DEVNET_VERSION .env.devnet | sed 's|export ||g' >> $GITHUB_ENV |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Tip
Codebase Verification
The STARKNET_DEVNET_VERSION
variable is set in the .env.devnet
file with the value 0.0.5
. However, the initial script to verify if the variable is set and not empty did not produce any output. This suggests that the variable might not be correctly exported to the GitHub Actions environment.
To ensure the variable is correctly exported, consider adding a check in the GitHub Actions workflow to verify that the variable is set and not empty after attempting to export it.
- Location to update:
.github/workflows/ci.yaml
- Suggested addition:
- name: Retrieve starknet devnet version shell: bash run: | grep STARKNET_DEVNET_VERSION .env.devnet | sed 's|export ||g' >> $GITHUB_ENV if [ -z "$STARKNET_DEVNET_VERSION" ]; then echo "STARKNET_DEVNET_VERSION is not set or is empty" >&2 exit 1 fi
Analysis chain
The approach to dynamically retrieve the starknet-devnet
version is sound. However, consider adding a check to ensure the STARKNET_DEVNET_VERSION
variable is successfully retrieved and not empty.
Scripts executed
The following scripts were executed for the analysis:
Script:
#!/bin/bash
# Description: Verify that the STARKNET_DEVNET_VERSION is set and not empty.
# Test: Check if the variable is set and non-empty. Expect: Non-empty output.
echo $STARKNET_DEVNET_VERSION
Length of output: 7
Script:
#!/bin/bash
# Description: Check the contents of the .env.devnet file for the STARKNET_DEVNET_VERSION variable.
# Test: Display the line containing STARKNET_DEVNET_VERSION. Expect: Line with STARKNET_DEVNET_VERSION and its value.
grep STARKNET_DEVNET_VERSION .env.devnet
Length of output: 79
CI workflow now retrieve starknet devnet version from
.env.devnet
Closes #370
Summary by CodeRabbit