Skip to content

Comments

chore(turbo): more build caching#1667

Merged
yusukebe merged 3 commits intohonojs:mainfrom
BarryThePenguin:chore/ci-build-cache
Jan 2, 2026
Merged

chore(turbo): more build caching#1667
yusukebe merged 3 commits intohonojs:mainfrom
BarryThePenguin:chore/ci-build-cache

Conversation

@BarryThePenguin
Copy link
Contributor

Use turbo cache when building packages

@changeset-bot
Copy link

changeset-bot bot commented Dec 28, 2025

⚠️ No Changeset found

Latest commit: 3166b3a

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

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

Comment on lines +33 to -35
- run: yarn lint:fix --cache-strategy content
- run: yarn format:fix
- run: yarn lint:fix
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Reorder the fix commands so that prettier will format fixes from eslint

Comment on lines -21 to -24
- run: yarn workspace @hono/bun-transpiler build
- run: yarn workspace @hono/bun-transpiler typecheck
- run: yarn eslint packages/bun-transpiler
- run: yarn prettier --check . !packages packages/bun-transpiler
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Use turbo to run the build command so the build cache is used

Also removes the eslint and prettier checks as they are handled by the build job in ci.yml

node-version-file: .tool-versions
- run: yarn workspaces focus hono-middleware @hono/${{ matrix.package }}
- run: yarn workspaces foreach --topological --recursive --from @hono/${{ matrix.package }} run build
- run: yarn turbo --filter @hono/${{ matrix.package }} build
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Use turbo to run the build command so the build cache is used

- run: yarn
- run: yarn typecheck
- run: yarn lint
- run: yarn lint --cache-strategy content
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Use content as the --cache-strategy in CI

node-version-file: .tool-versions
- run: yarn workspaces focus hono-middleware @hono/${{ matrix.package }}
- run: yarn workspaces foreach --topological --recursive --from @hono/${{ matrix.package }} run build
- run: yarn turbo --filter @hono/${{ matrix.package }} build
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Use turbo to run the build command so the build cache is used

Comment on lines +4 to +7
"build": {
"dependsOn": ["^build"],
"outputs": ["dist/**"]
},
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Adding the build command as a task so turbo can cache the build output, eg; the dist directory when running tsdown

@codecov
Copy link

codecov bot commented Dec 28, 2025

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 92.24%. Comparing base (5acf969) to head (a04eaa8).

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #1667   +/-   ##
=======================================
  Coverage   92.24%   92.24%           
=======================================
  Files         111      111           
  Lines        3661     3661           
  Branches      967      956   -11     
=======================================
  Hits         3377     3377           
  Misses        250      250           
  Partials       34       34           
Flag Coverage Δ
ajv-validator 100.00% <ø> (ø)
arktype-validator 93.54% <ø> (ø)
auth-js 98.57% <ø> (ø)
bun-compress 18.91% <ø> (ø)
capnweb 60.71% <ø> (ø)
casbin 86.48% <ø> (ø)
class-validator 95.00% <ø> (ø)
clerk-auth 88.46% <ø> (ø)
cloudflare-access 100.00% <ø> (ø)
conform-validator 96.15% <ø> (ø)
effect-validator 100.00% <ø> (ø)
esbuild-transpiler 100.00% <ø> (ø)
event-emitter 100.00% <ø> (ø)
firebase-auth 96.61% <ø> (ø)
graphql-server 92.15% <ø> (ø)
hello 100.00% <ø> (ø)
mcp 90.60% <ø> (ø)
medley-router 90.90% <ø> (ø)
node-ws 80.68% <ø> (ø)
oauth-providers 92.48% <ø> (ø)
oidc-auth 96.44% <ø> (ø)
otel 93.65% <ø> (ø)
prometheus 90.24% <ø> (ø)
react-renderer 88.88% <ø> (ø)
sentry 77.27% <ø> (ø)
session 98.91% <ø> (ø)
standard-validator 96.10% <ø> (ø)
stytch-auth 100.00% <ø> (ø)
swagger-editor 73.68% <ø> (ø)
swagger-ui 95.00% <ø> (ø)
trpc-server 69.56% <ø> (ø)
tsyringe 100.00% <ø> (ø)
typebox-validator 100.00% <ø> (ø)
typedriver-validator 100.00% <ø> (ø)
typia-validator 87.75% <ø> (ø)
ua-blocker 90.00% <ø> (ø)
valibot-validator 84.61% <ø> (ø)
zod-openapi 93.79% <ø> (ø)
zod-validator 91.30% <ø> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.


- name: Build
run: yarn build
run: yarn turbo build
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Use turbo to run the build command during a release

@BarryThePenguin BarryThePenguin force-pushed the chore/ci-build-cache branch 2 times, most recently from 25f9478 to a04eaa8 Compare December 30, 2025 20:42
Copy link
Member

@yusukebe yusukebe left a comment

Choose a reason for hiding this comment

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

LGTM!

@yusukebe
Copy link
Member

yusukebe commented Jan 2, 2026

@BarryThePenguin

Thank you! I'm interested to see the effects.

@yusukebe yusukebe merged commit d2c4995 into honojs:main Jan 2, 2026
6 checks passed
@BarryThePenguin BarryThePenguin deleted the chore/ci-build-cache branch January 2, 2026 00:24
@BarryThePenguin
Copy link
Contributor Author

@BarryThePenguin

Thank you! I'm interested to see the effects.

Based on my testing the autofix workflow takes about 1 minute with a warm cache, most of which is yarn install. Previously it was 2 or 3 minutes

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