From d2dbfa7604204cd712c3c74a49d48643cc4a0abb Mon Sep 17 00:00:00 2001 From: RJ Hollberg Date: Sat, 12 Sep 2026 10:28:50 -0600 Subject: [PATCH] fix: split the script-tester and product-CI meanings of continuous-integration.yml The scaffolding scripts' own test runner and a leaf's real build/test/pack pipeline both wanted the path .github/workflows/continuous-integration.yml, which is the leaf's forever-conflict on every template-sync. Rename the script-tester back to test-scripts.yml and reserve continuous-integration.yml exclusively for a repo's own product pipeline. --- .claude/skills/template-sync/SKILL.md | 13 ++++++++----- ...{continuous-integration.yml => test-scripts.yml} | 6 +++--- README.md | 4 ++-- docs/TemplateChain.md | 13 ++++++++----- scripts/New-Repo-Files.psm1 | 4 ++-- scripts/README.md | 4 ++-- scripts/tests/New-Repo-Files.Tests.ps1 | 6 +++--- 7 files changed, 28 insertions(+), 22 deletions(-) rename .github/workflows/{continuous-integration.yml => test-scripts.yml} (90%) diff --git a/.claude/skills/template-sync/SKILL.md b/.claude/skills/template-sync/SKILL.md index 2c45448..ec7cb38 100644 --- a/.claude/skills/template-sync/SKILL.md +++ b/.claude/skills/template-sync/SKILL.md @@ -45,11 +45,14 @@ own customizations or drifts from its template. - **`.github/workflows/template-sync.yml` — the template, always.** It carries no per-repo values: `TEMPLATE_REPO_URL` and `TEMPLATE_SYNC_STRATEGY` are repo variables, so it cannot legitimately differ from the parent's. -- **`.github/workflows/continuous-integration.yml` — the template in a - template layer, the leaf in a leaf.** The test runner discovers its files, - so a template layer's copy cannot legitimately differ from the parent's. - A leaf has no `scripts/` — scaffolding deleted the template's workflow - with them — so the one it carries is its own; keep it. +- **`.github/workflows/test-scripts.yml` — the template, always.** The test + runner discovers its files, so a template layer's copy cannot legitimately + differ from the parent's. A leaf has no `scripts/` — scaffolding deletes + this workflow along with them, so a leaf never carries this file at all. +- **`.github/workflows/continuous-integration.yml` — owned locally, if it + exists at all.** Not shipped by the template. A leaf (or a template layer + generating one for the leaves it scaffolds) authors its own product + build/test/pack pipeline under this name; keep the local copy. - **`README.md` — split.** This repo owns the diagram highlight and its own tables; the template owns the shared structure. - **`LICENSE` — this repo**, if it is private and carries the proprietary diff --git a/.github/workflows/continuous-integration.yml b/.github/workflows/test-scripts.yml similarity index 90% rename from .github/workflows/continuous-integration.yml rename to .github/workflows/test-scripts.yml index 7445a58..2a167e7 100644 --- a/.github/workflows/continuous-integration.yml +++ b/.github/workflows/test-scripts.yml @@ -5,20 +5,20 @@ # *.Tests.ps1 itself, so this file lists nothing and stays identical at every # template layer. A leaf has no scripts/, so this is a clean no-op there. -name: Continuous Integration +name: Test Scripts on: pull_request: paths: - scripts/** - - .github/workflows/continuous-integration.yml + - .github/workflows/test-scripts.yml # Can be triggered manually workflow_dispatch: # A newer push to the same branch supersedes a run still in progress. concurrency: - group: continuous-integration-${{ github.ref }} + group: test-scripts-${{ github.ref }} cancel-in-progress: true jobs: diff --git a/README.md b/README.md index 277c57d..144beb0 100644 --- a/README.md +++ b/README.md @@ -140,9 +140,9 @@ workflow below marked *via* is a thin trigger that calls one. | :---------------------------------------------------------------------------------- | :---------------------------------------------------------------------------------------- | | 📁[.github/][githubFolder] | | |  └─📁[workflows/][workflowFolder] | | -|        ├─📄[Continuous Integration][ciWorkflow] | Runs the [scaffolding scripts'][scriptsFile] tests on both platforms | |        ├─📄[Draft Release][draftWorkflow] | Entry point for [cutting a release][releaseFile], via [TaffarelJr/.actions][actionsRepo] | |        ├─📄[Template Sync][syncWorkflow] | Brings changes from a template repo, via [TaffarelJr/.actions][actionsRepo] | +|        ├─📄[Test Scripts][testScriptsWorkflow] | Runs the [scaffolding scripts'][scriptsFile] tests on both platforms | |        └─📄[Validate Codecov][codecovWorkflow] | Checks `codecov.yml` against Codecov's validator, via [TaffarelJr/.actions][actionsRepo] | ### Other Files @@ -172,9 +172,9 @@ workflow below marked *via* is a thin trigger that calls one. [issueFormsFolder]: ./.github/ISSUE_TEMPLATE/ [issueChooserFile]: ./.github/ISSUE_TEMPLATE/config.yml [workflowFolder]: ./.github/workflows/ -[ciWorkflow]: ./.github/workflows/continuous-integration.yml [draftWorkflow]: ./.github/workflows/draft-release.yml [syncWorkflow]: ./.github/workflows/template-sync.yml +[testScriptsWorkflow]: ./.github/workflows/test-scripts.yml [codecovWorkflow]: ./.github/workflows/validate-codecov.yml [codeOwnFile]: ./.github/CODEOWNERS [codecovFile]: ./.github/codecov.yml diff --git a/docs/TemplateChain.md b/docs/TemplateChain.md index f239b49..d0c43e7 100644 --- a/docs/TemplateChain.md +++ b/docs/TemplateChain.md @@ -234,11 +234,14 @@ Resolve by taking the incoming structure and re-applying the local keys. - **Repo settings — this repo.** It declares only its own deltas; the rest is inherited through `_extends` at runtime, not through the file. -- **The CI workflow — the template, until a layer builds something.** - The base's runs the scaffolding scripts' tests, and the runner discovers - each layer's own test files, so a template layer runs it verbatim. - A leaf has no scripts: scaffolding deletes the workflow along with them, - and the leaf writes its own — which is where its toolchain lives. +- **`test-scripts.yml` — the template, always.** It runs the scaffolding + scripts' own tests, and the runner discovers each layer's own test files, + so a template layer runs it verbatim. A leaf has no scripts: scaffolding + deletes this workflow along with them. +- **`continuous-integration.yml` — owned locally, if it exists at all.** + Not shipped by the template — a leaf (or a template layer generating one + for the leaves it scaffolds) writes its own here, which is where its + toolchain lives. - **The publish workflow — this layer.** What happens when a release is published is the layer's own business, so a layer with something to do at that moment carries its own `publish-release.yml`, diff --git a/scripts/New-Repo-Files.psm1 b/scripts/New-Repo-Files.psm1 index 0170afc..af362aa 100644 --- a/scripts/New-Repo-Files.psm1 +++ b/scripts/New-Repo-Files.psm1 @@ -72,7 +72,7 @@ function Remove-TemplateOnlyFile { function Remove-ScriptsFolder { <# .SYNOPSIS - Deletes the scripts/ folder and its CI workflow in a code repo, since + Deletes the scripts/ folder and test-scripts.yml in a code repo, since nothing is derived from one and there is nothing left to test. #> param( @@ -83,7 +83,7 @@ function Remove-ScriptsFolder { Write-Doing 'Removing scripts/' $dir = Join-Path $RepoPath 'scripts' - $workflow = Join-Path $RepoPath '.github/workflows/continuous-integration.yml' + $workflow = Join-Path $RepoPath '.github/workflows/test-scripts.yml' if (-not (Test-Path $dir) -and -not (Test-Path $workflow)) { Write-Done -Skip 'already removed' return diff --git a/scripts/README.md b/scripts/README.md index 5c33ebf..f85127d 100644 --- a/scripts/README.md +++ b/scripts/README.md @@ -157,10 +157,10 @@ Each `*.Tests.ps1` runs in its own PowerShell process on the shared never leak between files. `Common-Git` is the slow one: it drives real `git` repos, because nothing else can vouch for what git does. -The [Continuous Integration][ciWorkflow] workflow runs the same suite on +The [Test Scripts][testScriptsWorkflow] workflow runs the same suite on Ubuntu and Windows for every pull request that touches `scripts/`. -[ciWorkflow]: ../.github/workflows/continuous-integration.yml +[testScriptsWorkflow]: ../.github/workflows/test-scripts.yml [chainFile]: ../docs/TemplateChain.md diff --git a/scripts/tests/New-Repo-Files.Tests.ps1 b/scripts/tests/New-Repo-Files.Tests.ps1 index 6ea35b7..7a2bf22 100644 --- a/scripts/tests/New-Repo-Files.Tests.ps1 +++ b/scripts/tests/New-Repo-Files.Tests.ps1 @@ -273,7 +273,7 @@ Write-TestSection '9. Remove-ScriptsFolder' # Arrange $repo = New-Repo -Name 'scripts-repo' Write-RepoFile -Repo $repo -Relative 'scripts/x.psm1' -Text 'x' -Write-RepoFile -Repo $repo -Relative '.github/workflows/continuous-integration.yml' -Text 'y' +Write-RepoFile -Repo $repo -Relative '.github/workflows/test-scripts.yml' -Text 'y' $before = Get-ChangeCount # Act @@ -281,8 +281,8 @@ Remove-ScriptsFolder -RepoPath $repo 6>$null # Assert Assert-That 'scripts/ is gone' (-not (Test-Path (Join-Path $repo 'scripts'))) -Assert-That 'and its CI workflow too' ` - (-not (Test-Path (Join-Path $repo '.github/workflows/continuous-integration.yml'))) +Assert-That 'and test-scripts.yml too' ` + (-not (Test-Path (Join-Path $repo '.github/workflows/test-scripts.yml'))) Assert-That 'and it records a change' ((Get-ChangeCount) -gt $before) # Arrange