From b2b08504678046dda1e0f05f416109a46d8d7d1b Mon Sep 17 00:00:00 2001 From: Jeffrey Smith Date: Thu, 2 Apr 2026 12:57:44 +0000 Subject: [PATCH] Add packages path detection to CI pipeline packages/* changes now set a dedicated `packages` output flag in detect-changes, rather than falling through to OTHER. Also classify ci/* as infra. Prepares the test-runners gate condition for v0.7.5. Co-Authored-By: Claude Opus 4.6 (1M context) --- .gitea/workflows/ci.yaml | 21 ++++++++++++++++----- 1 file changed, 16 insertions(+), 5 deletions(-) diff --git a/.gitea/workflows/ci.yaml b/.gitea/workflows/ci.yaml index dd4d784..50852bf 100644 --- a/.gitea/workflows/ci.yaml +++ b/.gitea/workflows/ci.yaml @@ -7,9 +7,10 @@ # # Pipeline: # 0. Detect changes (path-based gating for all downstream jobs) -# 1a. Frontend tests — skipped if only BE/docs changed +# 1a. Frontend tests — skipped if only BE/docs/packages changed # 1b. Go unit tests — all non-DB packages + SQLite integration (race-enabled) # 1c. Go test (PG) — PG store + handlers against Postgres (race-enabled) +# 1d. Test runners — disabled until v0.7.5 (Playwright headless fix) # 2. Build + Deploy — skipped if docs-only change # # Test coverage mapping (no package tested by zero jobs): @@ -23,7 +24,9 @@ # Path gating rules: # src/, src/editor/ → frontend tests # server/, scripts/db-* → backend tests (PG + SQLite) +# packages/ → test-runners (surface/extension tests) # Dockerfile*, k8s/, .gitea/ → all tests (infra change) +# ci/ → infra (CI scripts) # docs/, *.md → skip all tests + deploy # VERSION, scripts/* → frontend + backend tests # Tags (v*) → always full pipeline @@ -100,6 +103,7 @@ jobs: outputs: frontend: ${{ steps.filter.outputs.frontend }} backend: ${{ steps.filter.outputs.backend }} + packages: ${{ steps.filter.outputs.packages }} infra: ${{ steps.filter.outputs.infra }} docs_only: ${{ steps.filter.outputs.docs_only }} steps: @@ -137,7 +141,7 @@ jobs: echo "${CHANGED}" | sed 's/^/ /' # Classify - FE=false; BE=false; INFRA=false; DOCS=false; OTHER=false + FE=false; BE=false; PKG=false; INFRA=false; DOCS=false; OTHER=false while IFS= read -r file; do [[ -z "$file" ]] && continue case "$file" in @@ -145,19 +149,23 @@ jobs: FE=true ;; server/*|scripts/db-*) BE=true ;; + packages/*) + PKG=true ;; .gitea/*|k8s/*|Dockerfile*|docker-compose*|docker-entrypoint*|nginx.conf) INFRA=true ;; docs/*|*.md|CHANGELOG.md|LICENSE) DOCS=true ;; VERSION|scripts/*) FE=true; BE=true ;; + ci/*) + INFRA=true ;; *) OTHER=true ;; esac done <<< "${CHANGED}" # Docs-only: only docs changed, nothing else - if [[ "$DOCS" == "true" && "$FE" == "false" && "$BE" == "false" && "$INFRA" == "false" && "$OTHER" == "false" ]]; then + if [[ "$DOCS" == "true" && "$FE" == "false" && "$BE" == "false" && "$PKG" == "false" && "$INFRA" == "false" && "$OTHER" == "false" ]]; then DOCS_ONLY=true else DOCS_ONLY=false @@ -165,6 +173,7 @@ jobs: echo "frontend=${FE}" >> "$GITHUB_OUTPUT" echo "backend=${BE}" >> "$GITHUB_OUTPUT" + echo "packages=${PKG}" >> "$GITHUB_OUTPUT" echo "infra=${INFRA}" >> "$GITHUB_OUTPUT" echo "docs_only=${DOCS_ONLY}" >> "$GITHUB_OUTPUT" @@ -172,6 +181,7 @@ jobs: echo "━━━ Change Detection ━━━" echo " frontend: ${FE}" echo " backend: ${BE}" + echo " packages: ${PKG}" echo " infra: ${INFRA}" echo " docs_only: ${DOCS_ONLY}" @@ -375,12 +385,13 @@ jobs: # test-runners surface after deploy until this is resolved. # See: docker-compose.ci.yml, ci/surface-test-driver.js # - # Runs when: backend or frontend changed (runners test both tiers). + # Runs when: backend, frontend, or packages changed (runners test all tiers). # Skipped when: only docs changed. test-runners: runs-on: ubuntu-latest needs: [detect-changes] - if: false # disabled — see comment above + if: false # disabled — see comment above. Condition for v0.7.5: + # needs.detect-changes.outputs.backend == 'true' || needs.detect-changes.outputs.frontend == 'true' || needs.detect-changes.outputs.packages == 'true' || needs.detect-changes.outputs.infra == 'true' steps: - name: Checkout uses: actions/checkout@v4