-
-
Notifications
You must be signed in to change notification settings - Fork 89
Clean up CI #546
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
Clean up CI #546
Conversation
Summary of ChangesHello @moreal, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed! This pull request significantly enhances CI efficiency by optimizing build and test workflows. It eliminates redundant build steps by ensuring that the Highlights
Ignored Files
Using Gemini Code AssistThe full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips. Invoking Gemini You can request assistance from Gemini at any point by creating a comment using either
Customization To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a Limitations & Feedback Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for Github and other Google products, sign up here. You can also get AI-powered code generation, chat, as well as code reviews directly in the IDE at no cost with the Gemini Code Assist IDE Extension. Footnotes
|
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.
Code Review
This pull request introduces a sensible optimization to the CI test execution. By adding the --parallel flag to the test:node and test:bun tasks in mise.toml, you're enabling parallel execution of test suites across different packages. This change is well-justified in the pull request description, as the necessary build steps are handled prior to the test execution, either through the prepare dependency for local runs or during the setup-mise step in CI. This should lead to a welcome reduction in CI run times without compromising correctness. The changes are clear and logical.
Since setup-mise already runs `pnpm install` which triggers the `prepare` script (`pnpm -r run build:self`), the build is already complete before test jobs run. Adding `--skip-deps` to mise run commands prevents the duplicate execution of the prepare task. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <[email protected]>
Since builds are now completed by setup-mise before tests run, there's no need to run tests in topological order. Adding --parallel to pnpm run commands allows all package tests to execute concurrently, reducing overall test execution time. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <[email protected]>
Codecov Report✅ All modified and coverable lines are covered by tests. 🚀 New features to boost your workflow:
|
dahlia
left a comment
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.
Thanks!
Summary
This pull request has a similar context with #543. These changes have two main points.
First one is to avoid to repeat
pnpm run -r build:self. Thepnpm run -r build:selfcommand is already executed by the miseinstalltask, which runs during thesetup-miseaction. The miseinstalltask performs thedeno task installcommand, which in turn executesdeno run --allow-read --allow-env --allow-run scripts/install.ts && pnpm install. Subsequently,pnpm installinvokes thepreparescript, which is a lifecycle script. The rootpreparescript runspnpm run -r build:self, which is the same command executed by the misepreparetask. As long as thesetup-miseaction runsmise run install, we can assume that the misepreparetask has already been executed. Therefore, when running tests, we pass the--skip-depsargument to avoid re-executing the misepreparetask (i.e.,pnpm run -r build:self).The second change involves running tests in parallel. For Deno, we are already using the
--paralleloption. In the case of Node.js and Bun, we previously needed to runpnpm buildbeforehand, which required sequential execution in topological order as provided bypnpm run -r. However, since we now have confidence that the build is completed during thesetup-misestep, we only need to run the tests themselves, so we pass the--parallel1 option.Related issue
I couldn't find related opened issue when searching with the following query:
label:component/ciredundantimprovemisecleanChanges
testjob inmain.yamlrunmise run test:denowith--skip-depsto skip misepreparetask.test-nodejob inmain.yamlrunmise run test:nodewith--skip-depsto skip misepreparetask.test-bunjob inmain.yamlrunmise run test:bunwith--skip-depsto skip misepreparetask.release-testjob inmain.yamlrunpnpm publishwith--config.enable-pre-post-scripts=falseto disable pre/post scripts.build-packagesjob inmain.yamlrunpnpm packwith--config.enable-pre-post-scripts=falseto disable pre/post scripts.build-packagesjob inpublish-pr.yamlrunpnpm packwith--config.enable-pre-post-scripts=falseto disable pre/post scripts.test:nodetask inmise.tomlrunpnpm runwith--parallelflag to run Node.js tests in parallel.test:buntask inmise.tomlrunpnpm runwith--parallelflag to run Bun tests in parallel.Benefits
This pull request reduces CI execution time. It can provide quick feedback to contributors.
It's not precise, but for comparison (
beforeis measured at 2fb9d6a):<job>:<before>→<after>waiting→ 3m 38s (I wanted to filltest-bunalso but it's too flaky because ofPostgresMessageQueuetest)In terms of interpretation, test-deno improved by about 1 minute because it doesn't run the
preparetask redundantly. For test-node and test-bun, they improved by over 2 minutes because they run tests in parallel without redundantly executing thepreparetask. Forrelease-test, the improvement is even greater because it avoids numerous redundant builds caused bypnpm build.Checklist
mise teston your machine?Additional notes
In fact, I believe this issue arises because
setup-misenot only sets up mise but also implicitly handles installation, and becausepnpm run -r build:selfis invoked in multiple scattered locations without the ability to calculate and respect dependencies. While I feel that adopting a monorepo tool would be necessary to address this comprehensively, I am proposing these changes as an improvement within the current structure.https://pnpm.io/cli/run#--parallel
https://docs.npmjs.com/cli/v11/using-npm/scripts#life-cycle-scripts
Footnotes
https://pnpm.io/cli/run#--parallel ↩