Skip to content

Conversation

@moreal
Copy link
Contributor

@moreal moreal commented Jan 28, 2026

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. The pnpm run -r build:self command is already executed by the mise install task, which runs during the setup-mise action. The mise install task performs the deno task install command, which in turn executes deno run --allow-read --allow-env --allow-run scripts/install.ts && pnpm install. Subsequently, pnpm install invokes the prepare script, which is a lifecycle script. The root prepare script runs pnpm run -r build:self, which is the same command executed by the mise prepare task. As long as the setup-mise action runs mise run install, we can assume that the mise prepare task has already been executed. Therefore, when running tests, we pass the --skip-deps argument to avoid re-executing the mise prepare task (i.e., pnpm run -r build:self).

The second change involves running tests in parallel. For Deno, we are already using the --parallel option. In the case of Node.js and Bun, we previously needed to run pnpm build beforehand, which required sequential execution in topological order as provided by pnpm run -r. However, since we now have confidence that the build is completed during the setup-mise step, 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/ci
  • redundant
  • improve
  • mise
  • clean

Changes

  • Let test job in main.yaml run mise run test:deno with --skip-deps to skip mise prepare task.
  • Let test-node job in main.yaml run mise run test:node with --skip-deps to skip mise prepare task.
  • Let test-bun job in main.yaml run mise run test:bun with --skip-deps to skip mise prepare task.
  • Let release-test job in main.yaml run pnpm publish with --config.enable-pre-post-scripts=false to disable pre/post scripts.
  • Let build-packages job in main.yaml run pnpm pack with --config.enable-pre-post-scripts=false to disable pre/post scripts.
  • Let build-packages job in publish-pr.yaml run pnpm pack with --config.enable-pre-post-scripts=false to disable pre/post scripts.
  • Let test:node task in mise.toml run pnpm run with --parallel flag to run Node.js tests in parallel.
  • Let test:bun task in mise.toml run pnpm run with --parallel flag 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 (before is measured at 2fb9d6a):

  • <job>: <before><after>
  • test-deno: 9m 39s → 7m 16s
  • test-node: 7m 42s → 5m 7s
  • test-bun: waiting → 3m 38s (I wanted to fill test-bun also but it's too flaky because of PostgresMessageQueue test)
  • release-test: 22m 0s → 2m 58s

In terms of interpretation, test-deno improved by about 1 minute because it doesn't run the prepare task redundantly. For test-node and test-bun, they improved by over 2 minutes because they run tests in parallel without redundantly executing the prepare task. For release-test, the improvement is even greater because it avoids numerous redundant builds caused by pnpm build.

Checklist

  • Did you add a changelog entry to the CHANGES.md?
  • Did you write some relevant docs about this change (if it's a new feature)?
  • Did you write a regression test to reproduce the bug (if it's a bug fix)?
  • Did you write some tests for this change (if it's a new feature)?
  • Did you run mise test on your machine?

Additional notes

In fact, I believe this issue arises because setup-mise not only sets up mise but also implicitly handles installation, and because pnpm run -r build:self is 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

--parallel

Completely disregard concurrency and topological sorting, running a given script immediately in all matching packages with prefixed streaming output. This is the preferred flag for long-running processes over many packages, for instance, a lengthy build process.


https://docs.npmjs.com/cli/v11/using-npm/scripts#life-cycle-scripts

prepare (since [email protected])

...

Runs on local npm install without package arguments (runs with flags like --production or --omit=dev, but does not run when installing specific packages like npm install express)

Footnotes

  1. https://pnpm.io/cli/run#--parallel

@issues-auto-labeler issues-auto-labeler bot added component/build Build system and packaging component/ci CI/CD workflows and GitHub Actions component/testing Testing utilities (@fedify/testing) labels Jan 28, 2026
@gemini-code-assist
Copy link
Contributor

Summary of Changes

Hello @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 setup-mise action handles necessary installations, allowing subsequent test jobs to skip the mise prepare task. Furthermore, it introduces parallel execution for Node.js and Bun tests and disables pre/post scripts for pnpm publish and pnpm pack commands, collectively leading to a faster and more streamlined continuous integration pipeline.

Highlights

  • CI Optimization (Deno Tests): The test job in main.yaml now runs mise run test:deno with --skip-deps to prevent redundant mise prepare task execution.
  • CI Optimization (Node.js Tests): The test-node job in main.yaml now runs mise run test:node with --skip-deps to prevent redundant mise prepare task execution.
  • CI Optimization (Bun Tests): The test-bun job in main.yaml now runs mise run test:bun with --skip-deps to prevent redundant mise prepare task execution.
  • Build Process (Publish): The release-test job in main.yaml now runs pnpm publish with --config.enable-pre-post-scripts=false to disable pre/post scripts.
  • Build Process (Packaging): The build-packages job in main.yaml now runs pnpm pack with --config.enable-pre-post-scripts=false to disable pre/post scripts.
  • Build Process (PR Packaging): The build-packages job in publish-pr.yaml now runs pnpm pack with --config.enable-pre-post-scripts=false to disable pre/post scripts.
  • Parallel Test Execution (Node.js): The test:node task in mise.toml now uses the --parallel flag with pnpm run to execute Node.js tests concurrently.
  • Parallel Test Execution (Bun): The test:bun task in mise.toml now uses the --parallel flag with pnpm run to execute Bun tests concurrently.
Ignored Files
  • Ignored by pattern: .github/workflows/** (2)
    • .github/workflows/main.yaml
    • .github/workflows/publish-pr.yaml
Using Gemini Code Assist

The 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 /gemini <command> or @gemini-code-assist <command>. Below is a summary of the supported commands on the current page.

Feature Command Description
Code Review /gemini review Performs a code review for the current pull request in its current state.
Pull Request Summary /gemini summary Provides a summary of the current pull request in its current state.
Comment @gemini-code-assist Responds in comments when explicitly tagged, both in pull request comments and review comments.
Help /gemini help Displays a list of available commands.

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 .gemini/ folder in the base of the repository. Detailed instructions can be found here.

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

  1. Review the Privacy Notices, Generative AI Prohibited Use Policy, Terms of Service, and learn how to configure Gemini Code Assist in GitHub here. Gemini can make mistakes, so double check it and use code with caution.

Copy link
Contributor

@gemini-code-assist gemini-code-assist bot left a 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.

@moreal moreal changed the title Clean up test CI Clean up CI Jan 28, 2026
moreal and others added 3 commits January 28, 2026 22:51
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
Copy link

codecov bot commented Jan 28, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ All tests successful. No failed tests found.

🚀 New features to boost your workflow:
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@moreal moreal marked this pull request as ready for review January 28, 2026 14:16
Copy link
Member

@dahlia dahlia left a comment

Choose a reason for hiding this comment

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

Thanks!

@dahlia dahlia merged commit 3ff7cc9 into fedify-dev:main Jan 28, 2026
15 of 16 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

component/build Build system and packaging component/ci CI/CD workflows and GitHub Actions component/testing Testing utilities (@fedify/testing)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants