From eb9af0975fd1b1c382aad8bc27cf47382b4cde30 Mon Sep 17 00:00:00 2001 From: bigboateng Date: Sat, 18 Jul 2026 15:31:51 +0100 Subject: [PATCH] Keep sync path guard in control plane --- .github/workflows/ci.yml | 15 +++++++++++++++ boatstack/release_test.go | 17 ----------------- 2 files changed, 15 insertions(+), 17 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 6a6855d..2c65fa2 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -18,6 +18,21 @@ jobs: runs-on: ${{ matrix.os }} steps: - uses: actions/checkout@v4 + - name: Verify upstream sync source path + shell: bash + run: | + workflow=".github/workflows/sync-upstream.yml" + current="labs/12-product-engineering-loop" + retired="examples/12-product-engineering-loop" + count="$(grep -cF "$current" "$workflow")" + if [[ "$count" != "2" ]]; then + echo "Expected exactly two sync references to $current; found $count." >&2 + exit 1 + fi + if grep -Fq "$retired" "$workflow"; then + echo "Sync workflow still references retired path $retired." >&2 + exit 1 + fi - name: Detect projected runtime id: runtime shell: bash diff --git a/boatstack/release_test.go b/boatstack/release_test.go index d7becee..3aff5df 100644 --- a/boatstack/release_test.go +++ b/boatstack/release_test.go @@ -4,26 +4,9 @@ import ( "os" "path/filepath" "reflect" - "strings" "testing" ) -func TestSyncWorkflowUsesCurrentUpstreamLabPath(t *testing.T) { - workflow, err := os.ReadFile(filepath.Join("..", ".github", "workflows", "sync-upstream.yml")) - if err != nil { - t.Fatal(err) - } - content := string(workflow) - current := "labs/12-product-engineering-loop" - if count := strings.Count(content, current); count != 2 { - t.Fatalf("sync workflow contains %q %d times, want 2", current, count) - } - retired := "examples/12-product-engineering-loop" - if strings.Contains(content, retired) { - t.Fatalf("sync workflow still references retired upstream path %q", retired) - } -} - func TestClassifyReleasePaths(t *testing.T) { documentation := []string{ "README.md", "docs/getting-started.md", "assets/boatstack-mark.svg",