You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Adds a new GitHub Actions CI workflow using Yarn that installs dependencies, runs Solidity linting via Foundry, and executes Foundry tests on push, with a commented-out coverage job for future use.
Flow diagram for job and step execution in the Yarn CI workflow
Introduce CI workflow to install dependencies and share cached node_modules across jobs.
Create a GitHub Actions workflow triggered on every push with read-only contents permissions.
Add an install job that checks out the repo with submodules, sets up Node 18, restores/saves a Yarn cache keyed by OS and package manifests, and runs yarn install when the cache is cold.
.github/workflows/yarn_ci.yml
Add separate jobs to lint Solidity code and run Foundry tests using the shared installation setup.
Define a lint-sol job that depends on install, reuses checkout/setup-node/cache steps, installs the Foundry toolchain (nightly), and runs yarn lint:sol.
Define a foundry-tests job that depends on install, reuses checkout/setup-node/cache steps, installs the Foundry toolchain (nightly), and runs FOUNDRY_FUZZ_RUNS=1024 forge test -vvv.
Include a commented-out coverage job template that mirrors the install/setup steps, runs `yarn coverage
Tips and commands
Interacting with Sourcery
Trigger a new review: Comment @sourcery-ai review on the pull request.
Continue discussions: Reply directly to Sourcery's review comments.
Generate a GitHub issue from a review comment: Ask Sourcery to create an
issue from a review comment by replying to it. You can also reply to a
review comment with @sourcery-ai issue to create an issue from it.
Generate a pull request title: Write @sourcery-ai anywhere in the pull
request title to generate a title at any time. You can also comment @sourcery-ai title on the pull request to (re-)generate the title at any time.
Generate a pull request summary: Write @sourcery-ai summary anywhere in
the pull request body to generate a PR summary at any time exactly where you
want it. You can also comment @sourcery-ai summary on the pull request to
(re-)generate the summary at any time.
Generate reviewer's guide: Comment @sourcery-ai guide on the pull
request to (re-)generate the reviewer's guide at any time.
Resolve all Sourcery comments: Comment @sourcery-ai resolve on the
pull request to resolve all Sourcery comments. Useful if you've already
addressed all the comments and don't want to see them anymore.
Dismiss all Sourcery reviews: Comment @sourcery-ai dismiss on the pull
request to dismiss all existing Sourcery reviews. Especially useful if you
want to start fresh with a new review - don't forget to comment @sourcery-ai review to trigger a new review!
Reviewer's Guide
Adds a new GitHub Actions CI workflow using Yarn that installs dependencies, runs Solidity linting via Foundry, and executes Foundry tests on push, with a commented-out coverage job for future use.
Flow diagram for job and step execution in the Yarn CI workflow
flowchart TD start["Push to repository"] --> job_install["Job install"] subgraph install_steps["Job install steps"] i1["Checkout repo (actions/checkout@v3)"] i2["Setup Node 18 (actions/setup-node@v1)"] i3["Restore/save Yarn cache (actions/cache@master)"] i4["Run yarn install --network-concurrency 1 if cache miss"] end job_install --> i1 --> i2 --> i3 --> i4 job_install --> job_lint_sol["Job lint-sol (needs install)"] job_install --> job_foundry_tests["Job foundry-tests (needs install)"] job_install -.-> job_coverage["Job coverage (commented out, needs install)"] subgraph lint_steps["Job lint-sol steps"] l1["Checkout repo"] l2["Setup Node 18"] l3["Restore/save Yarn cache"] l4["Install Foundry toolchain (nightly)"] l5["Run yarn lint:sol"] end job_lint_sol --> l1 --> l2 --> l3 --> l4 --> l5 subgraph test_steps["Job foundry-tests steps"] t1["Checkout repo"] t2["Setup Node 18"] t3["Restore/save Yarn cache"] t4["Install Foundry toolchain (nightly)"] t5["Run FOUNDRY_FUZZ_RUNS=1024 forge test -vvv"] end job_foundry_tests --> t1 --> t2 --> t3 --> t4 --> t5 subgraph coverage_steps["Job coverage steps (commented out)"] c1["Checkout repo"] c2["Setup Node 18"] c3["Restore/save Yarn cache"] c4["Run yarn coverage || true"] c5["Send coverage to Coveralls"] end job_coverage -.-> c1 -.-> c2 -.-> c3 -.-> c4 -.-> c5 l5 --> end_lint["Lint completed"] t5 --> end_tests["Tests completed"] c5 -.-> end_coverage["Coverage completed (future)"]File-Level Changes
yarn installwhen the cache is cold..github/workflows/yarn_ci.ymlyarn lint:sol.FOUNDRY_FUZZ_RUNS=1024 forge test -vvv.Tips and commands
Interacting with Sourcery
@sourcery-ai reviewon the pull request.issue from a review comment by replying to it. You can also reply to a
review comment with
@sourcery-ai issueto create an issue from it.@sourcery-aianywhere in the pullrequest title to generate a title at any time. You can also comment
@sourcery-ai titleon the pull request to (re-)generate the title at any time.@sourcery-ai summaryanywhere inthe pull request body to generate a PR summary at any time exactly where you
want it. You can also comment
@sourcery-ai summaryon the pull request to(re-)generate the summary at any time.
@sourcery-ai guideon the pullrequest to (re-)generate the reviewer's guide at any time.
@sourcery-ai resolveon thepull request to resolve all Sourcery comments. Useful if you've already
addressed all the comments and don't want to see them anymore.
@sourcery-ai dismisson the pullrequest to dismiss all existing Sourcery reviews. Especially useful if you
want to start fresh with a new review - don't forget to comment
@sourcery-ai reviewto trigger a new review!Customizing Your Experience
Access your dashboard to:
summary, the reviewer's guide, and others.
Getting Help
Originally posted by @sourcery-ai[bot] in #8 (comment)