Add packages path detection to CI pipeline
All checks were successful
CI/CD / detect-changes (pull_request) Successful in 4s
CI/CD / test-runners (pull_request) Has been skipped
CI/CD / test-frontend (pull_request) Successful in 6s
CI/CD / test-go-pg (pull_request) Successful in 2m46s
CI/CD / test-sqlite (pull_request) Successful in 2m46s
CI/CD / build-and-deploy (pull_request) Successful in 26s
All checks were successful
CI/CD / detect-changes (pull_request) Successful in 4s
CI/CD / test-runners (pull_request) Has been skipped
CI/CD / test-frontend (pull_request) Successful in 6s
CI/CD / test-go-pg (pull_request) Successful in 2m46s
CI/CD / test-sqlite (pull_request) Successful in 2m46s
CI/CD / build-and-deploy (pull_request) Successful in 26s
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) <noreply@anthropic.com>
This commit is contained in:
@@ -7,9 +7,10 @@
|
|||||||
#
|
#
|
||||||
# Pipeline:
|
# Pipeline:
|
||||||
# 0. Detect changes (path-based gating for all downstream jobs)
|
# 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)
|
# 1b. Go unit tests — all non-DB packages + SQLite integration (race-enabled)
|
||||||
# 1c. Go test (PG) — PG store + handlers against Postgres (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
|
# 2. Build + Deploy — skipped if docs-only change
|
||||||
#
|
#
|
||||||
# Test coverage mapping (no package tested by zero jobs):
|
# Test coverage mapping (no package tested by zero jobs):
|
||||||
@@ -23,7 +24,9 @@
|
|||||||
# Path gating rules:
|
# Path gating rules:
|
||||||
# src/, src/editor/ → frontend tests
|
# src/, src/editor/ → frontend tests
|
||||||
# server/, scripts/db-* → backend tests (PG + SQLite)
|
# server/, scripts/db-* → backend tests (PG + SQLite)
|
||||||
|
# packages/ → test-runners (surface/extension tests)
|
||||||
# Dockerfile*, k8s/, .gitea/ → all tests (infra change)
|
# Dockerfile*, k8s/, .gitea/ → all tests (infra change)
|
||||||
|
# ci/ → infra (CI scripts)
|
||||||
# docs/, *.md → skip all tests + deploy
|
# docs/, *.md → skip all tests + deploy
|
||||||
# VERSION, scripts/* → frontend + backend tests
|
# VERSION, scripts/* → frontend + backend tests
|
||||||
# Tags (v*) → always full pipeline
|
# Tags (v*) → always full pipeline
|
||||||
@@ -100,6 +103,7 @@ jobs:
|
|||||||
outputs:
|
outputs:
|
||||||
frontend: ${{ steps.filter.outputs.frontend }}
|
frontend: ${{ steps.filter.outputs.frontend }}
|
||||||
backend: ${{ steps.filter.outputs.backend }}
|
backend: ${{ steps.filter.outputs.backend }}
|
||||||
|
packages: ${{ steps.filter.outputs.packages }}
|
||||||
infra: ${{ steps.filter.outputs.infra }}
|
infra: ${{ steps.filter.outputs.infra }}
|
||||||
docs_only: ${{ steps.filter.outputs.docs_only }}
|
docs_only: ${{ steps.filter.outputs.docs_only }}
|
||||||
steps:
|
steps:
|
||||||
@@ -137,7 +141,7 @@ jobs:
|
|||||||
echo "${CHANGED}" | sed 's/^/ /'
|
echo "${CHANGED}" | sed 's/^/ /'
|
||||||
|
|
||||||
# Classify
|
# 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
|
while IFS= read -r file; do
|
||||||
[[ -z "$file" ]] && continue
|
[[ -z "$file" ]] && continue
|
||||||
case "$file" in
|
case "$file" in
|
||||||
@@ -145,19 +149,23 @@ jobs:
|
|||||||
FE=true ;;
|
FE=true ;;
|
||||||
server/*|scripts/db-*)
|
server/*|scripts/db-*)
|
||||||
BE=true ;;
|
BE=true ;;
|
||||||
|
packages/*)
|
||||||
|
PKG=true ;;
|
||||||
.gitea/*|k8s/*|Dockerfile*|docker-compose*|docker-entrypoint*|nginx.conf)
|
.gitea/*|k8s/*|Dockerfile*|docker-compose*|docker-entrypoint*|nginx.conf)
|
||||||
INFRA=true ;;
|
INFRA=true ;;
|
||||||
docs/*|*.md|CHANGELOG.md|LICENSE)
|
docs/*|*.md|CHANGELOG.md|LICENSE)
|
||||||
DOCS=true ;;
|
DOCS=true ;;
|
||||||
VERSION|scripts/*)
|
VERSION|scripts/*)
|
||||||
FE=true; BE=true ;;
|
FE=true; BE=true ;;
|
||||||
|
ci/*)
|
||||||
|
INFRA=true ;;
|
||||||
*)
|
*)
|
||||||
OTHER=true ;;
|
OTHER=true ;;
|
||||||
esac
|
esac
|
||||||
done <<< "${CHANGED}"
|
done <<< "${CHANGED}"
|
||||||
|
|
||||||
# Docs-only: only docs changed, nothing else
|
# 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
|
DOCS_ONLY=true
|
||||||
else
|
else
|
||||||
DOCS_ONLY=false
|
DOCS_ONLY=false
|
||||||
@@ -165,6 +173,7 @@ jobs:
|
|||||||
|
|
||||||
echo "frontend=${FE}" >> "$GITHUB_OUTPUT"
|
echo "frontend=${FE}" >> "$GITHUB_OUTPUT"
|
||||||
echo "backend=${BE}" >> "$GITHUB_OUTPUT"
|
echo "backend=${BE}" >> "$GITHUB_OUTPUT"
|
||||||
|
echo "packages=${PKG}" >> "$GITHUB_OUTPUT"
|
||||||
echo "infra=${INFRA}" >> "$GITHUB_OUTPUT"
|
echo "infra=${INFRA}" >> "$GITHUB_OUTPUT"
|
||||||
echo "docs_only=${DOCS_ONLY}" >> "$GITHUB_OUTPUT"
|
echo "docs_only=${DOCS_ONLY}" >> "$GITHUB_OUTPUT"
|
||||||
|
|
||||||
@@ -172,6 +181,7 @@ jobs:
|
|||||||
echo "━━━ Change Detection ━━━"
|
echo "━━━ Change Detection ━━━"
|
||||||
echo " frontend: ${FE}"
|
echo " frontend: ${FE}"
|
||||||
echo " backend: ${BE}"
|
echo " backend: ${BE}"
|
||||||
|
echo " packages: ${PKG}"
|
||||||
echo " infra: ${INFRA}"
|
echo " infra: ${INFRA}"
|
||||||
echo " docs_only: ${DOCS_ONLY}"
|
echo " docs_only: ${DOCS_ONLY}"
|
||||||
|
|
||||||
@@ -375,12 +385,13 @@ jobs:
|
|||||||
# test-runners surface after deploy until this is resolved.
|
# test-runners surface after deploy until this is resolved.
|
||||||
# See: docker-compose.ci.yml, ci/surface-test-driver.js
|
# 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.
|
# Skipped when: only docs changed.
|
||||||
test-runners:
|
test-runners:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
needs: [detect-changes]
|
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:
|
steps:
|
||||||
- name: Checkout
|
- name: Checkout
|
||||||
uses: actions/checkout@v4
|
uses: actions/checkout@v4
|
||||||
|
|||||||
Reference in New Issue
Block a user