Skip to content

test: cover init modules and pipeline - #401

Merged
0x76agabond merged 5 commits into
Perfect-Abstractions:mainfrom
0x76agabond:test/compose-init
Sep 19, 2026
Merged

0x76agabond merged 5 commits into
Perfect-Abstractions:mainfrom
0x76agabond:test/compose-init

Conversation

@0x76agabond

@0x76agabond 0x76agabond commented Sep 17, 2026

Copy link
Copy Markdown
Collaborator

Summary

Add focused tests for the modules used by compose init and an integration test for the complete init pipeline.

Changes Made

  • Added focused tests for config, init, preflight, project directory, scaffolding, Diamond generation, deploy generation, and test generation modules.
  • Added an InitPipeline test harness using temporary directories and a fixture framework adapter.
  • Added pipeline coverage for bare Foundry, bare Hardhat, and minimal ERC-20 projects.
  • Updated the CLI workflow to run Vitest in CI.
  • Verified 130 CLI tests, TypeScript build, and lint successfully.
  • Reorganized adapters by interface.

Checklist

Before submitting this PR, please ensure:

  • Code follows the Solidity feature ban - Not applicable; no Solidity production code was changed.
  • Code follows Design Principles - Tests follow the existing module and adapter boundaries.
  • Code matches the codebase style - Test files follow the existing CLI test conventions.
  • Code is formatted with forge fmt - Not applicable; no Solidity files were changed.
  • Existing tests pass - All 130 CLI tests pass.
  • New tests are optional - New tests are included.
  • All tests pass - npm run cli@test, npm run cli@build, and npm run cli@lint pass.
  • Documentation updated - Not applicable; no user-facing behavior changed.
  • Changesets - No changeset is required because this PR only adds tests and CI coverage.

Make sure to follow the [contributing](https://compose.diamonds/docs/contribution/how-to-contribute) guidelines.

Additional Notes

Framework installation and real project compilation remain covered by the existing Foundry and Hardhat smoke-test steps in the CLI workflow. The Vitest pipeline tests use a fixture adapter so the regular test suite remains fast and deterministic.

@changeset-bot

changeset-bot Bot commented Sep 17, 2026

Copy link
Copy Markdown

🦋 Changeset detected

Latest commit: 4862d57

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 1 package
Name Type
@perfect-abstractions/compose-cli Patch

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@netlify

netlify Bot commented Sep 17, 2026

Copy link
Copy Markdown

👷 Deploy request for compose-diamonds pending review.

Visit the deploys page to approve it

Name Link
🔨 Latest commit 4862d57

@0x76agabond
0x76agabond requested a review from maxnorm September 19, 2026 14:20

@maxnorm maxnorm left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Hey @0x76agabond, i really like how you reorganized the adapters. It`s way cleaner.

For the test, i didn't review all of them but i trust you on this. You can merge when you feel it's ready.

On a sidenote, if we want a quick insight on PR, we could do a coverage comment action similar to our Solidity one but for the CLI. What do you think?

@0x76agabond

Copy link
Copy Markdown
Collaborator Author

Hey @0x76agabond, i really like how you reorganized the adapters. It`s way cleaner.

For the test, i didn't review all of them but i trust you on this. You can merge when you feel it's ready.

On a sidenote, if we want a quick insight on PR, we could do a coverage comment action similar to our Solidity one but for the CLI. What do you think?

Yeah, I like it. I think the coverage comment would be useful.
One other thing I’d like to add to the release flow is automatically updating the Compose dependency version in the CLI whenever Compose is released. Since they can now be released separately, this would keep the CLI from falling behind without relying on a manual update.

@maxnorm

maxnorm commented Sep 19, 2026

Copy link
Copy Markdown
Collaborator

One other thing I’d like to add to the release flow is automatically updating the Compose dependency version in the CLI whenever Compose is released. Since they can now be released separately, this would keep the CLI from falling behind without relying on a manual update.

Great idea!

@0x76agabond
0x76agabond merged commit 8d87f81 into Perfect-Abstractions:main Sep 19, 2026
5 checks passed
@0x76agabond
0x76agabond deleted the test/compose-init branch September 19, 2026 19:44
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