Skip to content

Conversation

@TheOrangePuff
Copy link
Member

@TheOrangePuff TheOrangePuff commented Aug 8, 2025

📝 Summary

Restructured the existing GitHub PR workflow to improve efficiency and parallelization by splitting the single build job into separate install, lint, build, and test jobs.

🚀 Changes Made

  • Split the existing build job into 4 separate jobs:

    • 📦 install: Handles dependency installation and caching
    • 🔍 lint: Runs linting on affected packages (extracted from build job)
    • 🏭 build: Builds affected packages only
    • 🧪 test: Runs tests on affected packages (unchanged behavior)
  • 💾 Implemented proper node_modules caching:

    • Install job creates cache of node_modules and .yarn/cache
    • Other jobs restore from cache instead of running yarn install
    • Cache key based on yarn.lock hash for accuracy
  • 🎯 Updated build commands to use affected:

    • Changed yarn nx run-many -t buildyarn nx affected:build
    • Ensures only changed packages are built (consistent with lint/test)
  • 🔧 Removed built-in yarn cache:

    • Removed cache: "yarn" from actions/setup-node@v4
    • Using explicit actions/cache@v3 for better control

💡 Benefits

  • ⚡ Better parallelization: Lint, build, and test now run simultaneously after install
  • 🚄 Improved efficiency: Dependencies installed once and shared across all jobs
  • 💰 Resource optimization: Eliminates redundant yarn install in each job
  • 🎯 Consistent affected logic: All jobs now process only changed packages
  • ⏱️ Faster feedback: Jobs can fail independently without blocking others

@TheOrangePuff TheOrangePuff force-pushed the feature/DO-1082_split-github-workflows branch from a3e9ef6 to e657506 Compare August 8, 2025 04:25
@TheOrangePuff TheOrangePuff force-pushed the feature/DO-1082_split-github-workflows branch from e1db833 to b1d1945 Compare August 8, 2025 04:35
@TheOrangePuff TheOrangePuff marked this pull request as ready for review August 8, 2025 04:46
@TheOrangePuff TheOrangePuff requested a review from a team as a code owner August 8, 2025 04:46
@TheOrangePuff TheOrangePuff merged commit e3ed805 into main Aug 8, 2025
8 checks passed
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.

3 participants