Add build-workflow concurrency and npm cache for JS setup (CI-009/CI-007)#397
Merged
Merged
Conversation
cloudofficer-admin
previously approved these changes
May 18, 2026
3345c95 to
58cd1a0
Compare
cloudofficer-admin
approved these changes
May 18, 2026
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
Two CI-efficiency findings from the ci-actions code review, both in the generated
build.yml(so they belong in the generator).Key changes:
lib/ghb/application.rb(workflow_set_defaults): when the old workflow has noconcurrency, default the generated build workflow to{ group: build-${{github.ref}}, cancel-in-progress: true }(mirrors the existingpermissions"use old, else default" pattern). Without it, every push to an open PR starts a fresh ~20-job build while the superseded run keeps going.config/languages.yaml: set the JavaScriptnode-cachesetup optionvalue: npm(was empty). Emptysetup_optionsvalues are skipped byadd_setup_options; a non-empty value makes it auto-copied into thesetupstep'swith:as${{env.NODE-CACHE}}(consumer-overridable via repo env), exactly likenode-version. Thesetupaction has no separate npm cache step —setup-nodeonly caches whennode-cacheis set — so npm deps were re-fetched every run. This is a pure config change; no generator code change needed.spec/fixtures/workflow_generation/build.yml: golden fixture regenerated — diff is exactly the addedconcurrency:block (the golden scenario is a Ruby project, so the JSnode-cacheconfig does not affect it).After merge, ci-actions'
build.ymlis regenerated (companion PR) to pick both up — same pattern as CI-002 (#387 → #202).Types of changes
Checklist