Optimize test CI workflow for faster execution#4
Merged
Conversation
Key optimizations: 1. **Parallel jobs**: Split into lint, build, and test jobs - lint: Runs linting, format check, and typecheck in parallel with build - build: Builds CLI and web UI, uploads artifacts - test: Downloads artifacts and runs integration tests 2. **Smart Docker caching with BuildKit**: - Always builds Docker image (ensures tests use correct image) - Uses registry-based layer caching (cache-from) - Detects perry/ directory changes to decide when to update cache - Fast builds (~30s) when using cached layers - Full rebuild when Dockerfile/scripts change 3. **Bun dependency caching**: Proper caching of bun install cache and node_modules directories 4. **Test setup optimization**: Skip Docker build in test setup when image already exists (CI pre-builds it) Expected performance: - No Dockerfile changes: ~6-7min (cached Docker layers) - Dockerfile changes: ~8-9min (full Docker rebuild) - Previous: ~10min 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
92feed1 to
b6c4bbf
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Optimizes the test CI workflow to reduce execution time through parallelization and smart Docker caching.
Key Changes
Parallel jobs: Split into 3 jobs that can run concurrently:
lint: Linting, format check, typecheck (~30s)build: Build CLI and web UI (~1min)test: Integration/E2E tests (depends on build, ~5-6min)Smart Docker caching with BuildKit:
cache-from)perry/directory changed to decide when to update cacheBun dependency caching: Proper caching of:
~/.bun/install/cachenode_modulesweb/node_modulesBuild artifacts: Upload/download dist directory between jobs
How Docker Caching Works
This ensures:
Expected Performance
Test Plan
🤖 Generated with Claude Code