Refactor CircleCI config for testing workflow#478
Conversation
Signed-off-by: Dargon789 <64915515+Dargon789@users.noreply.github.com>
Review or Edit in CodeSandboxOpen the branch in Web Editor • VS Code • Insiders |
|
|
This comment was marked as resolved.
This comment was marked as resolved.
Reviewer's guide (collapsed on small PRs)Reviewer's GuideRefactors the CircleCI pipeline to a simpler test-focused workflow using a Foundry Docker image, adding explicit build/test steps and renaming the workflow and job to "test"/"main" while removing the custom executor. File-Level Changes
Tips and commandsInteracting with Sourcery
Customizing Your ExperienceAccess your dashboard to:
Getting Help
|
✅ Snyk checks have passed. No issues have been found so far.
💻 Catch issues earlier using the plugins for VS Code, JetBrains IDEs, Visual Studio, and Eclipse. |
There was a problem hiding this comment.
Hey - I've found 1 issue, and left some high level feedback:
- Consider pinning the Foundry Docker image to a specific version/tag instead of
latestto ensure reproducible builds and avoid unexpected CI breakages when the image is updated. - You might want to add CircleCI caching (e.g., for build artifacts or dependencies used by
forge build/forge test) to reduce CI time on subsequent runs.
Prompt for AI Agents
Please address the comments from this code review:
## Overall Comments
- Consider pinning the Foundry Docker image to a specific version/tag instead of `latest` to ensure reproducible builds and avoid unexpected CI breakages when the image is updated.
- You might want to add CircleCI caching (e.g., for build artifacts or dependencies used by `forge build`/`forge test`) to reduce CI time on subsequent runs.
## Individual Comments
### Comment 1
<location path=".circleci/config.yml" line_range="9-14" />
<code_context>
- - run: |
- # echo Hello, World!
-
+ - run:
+ name: Install submodules
+ command: git submodule update --init --recursive
+ - run:
+ name: Build
+ command: forge build
+ - run:
+ name: Test
</code_context>
<issue_to_address>
**suggestion (performance):** Consider adding CircleCI caching around the build to speed up repeated runs.
Since `forge build` is relatively expensive, consider wrapping it with CircleCI `save_cache`/`restore_cache` for the build artifacts (e.g., `out` and `cache`), keyed by the `forge` version and relevant lockfiles, to speed up subsequent CI runs.
</issue_to_address>Help me be more useful! Please click 👍 or 👎 on each comment and I'll use the feedback to improve your reviews.
There was a problem hiding this comment.
Code Review
This pull request updates the CircleCI configuration to implement a testing pipeline using the Foundry toolchain. The changes replace a placeholder job with a 'test' job that handles submodule initialization, project building, and test execution. Review feedback recommends pinning the Docker image version to ensure build reproducibility and removing the redundant 'forge build' step, as 'forge test' automatically performs a build before running tests.
Summary by Sourcery
Refactor CircleCI configuration to use a simplified Foundry-based test job and workflow.
CI:
testjob that checks out code, updates git submodules, builds withforge, and runs tests with verbose output.mainto run the newtestjob.