Skip to content

Conversation

@ammar-agent
Copy link
Collaborator

Generated with cmux

Add node_modules directory caching to the setup-cmux action to dramatically reduce install times when the lockfile hasn't changed.

Changes

  • Added node_modules cache before bun install cache
  • Both caches use bun.lock hash as key for invalidation
  • Renamed bun cache key from bun- to bun-cache- for clarity

Expected Impact

Before: Every CI run executes bun install, taking 5-7 seconds even with bun's native caching

After: When bun.lock is unchanged, cache hit allows skipping full dependency installation, reducing to <1 second

Why This Works

  • node_modules cache: Restores the full dependency tree
  • Bun install cache: Speeds up fresh installs when lockfile changes
  • Together: Fast cache hits + fast misses

This is especially beneficial for integration tests which run frequently during development.

_Generated with `cmux`_

Add node_modules directory caching to drastically reduce install times
when the lockfile hasn't changed. This caches the entire node_modules
folder in addition to bun's install cache, eliminating the need to
reinstall packages on every CI run.

Expected impact: Reduce bun install time from 5-7s to <1s when cache hits.
Copy link

@chatgpt-codex-connector chatgpt-codex-connector bot left a comment

Choose a reason for hiding this comment

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

💡 Codex Review

Here are some automated review suggestions for this pull request.

ℹ️ About Codex in GitHub

Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".

Include Bun version and runner architecture in cache key to ensure
node_modules cache is invalidated when the Bun runtime changes. This
prevents native module ABI mismatches that could cause subtle failures.
@ammario ammario added this pull request to the merge queue Oct 26, 2025
Merged via the queue into main with commit 285d160 Oct 26, 2025
13 checks passed
@ammario ammario deleted the optimize-setup-cmux-cache branch October 26, 2025 17:54
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