|
| 1 | +# Deploy subsystem CI gate |
| 2 | +# |
| 3 | +# Runs the CLI test suite plus the deploy-specific harness scripts on any |
| 4 | +# PR/push that touches the wheels-deploy subsystem (cli/lucli/services/deploy/**, |
| 5 | +# cli/lucli/lib/deploy/**, fixtures, helpers, or the tooling itself). |
| 6 | +# |
| 7 | +# This is narrower than the broader `pr.yml` fast-test workflow, which runs |
| 8 | +# the core framework test suite on every PR against `develop`. Keeping this |
| 9 | +# one path-scoped means framework-only edits don't re-run the (slower) deploy |
| 10 | +# matrix, and deploy-subsystem edits pick up an extra gate. |
| 11 | +# |
| 12 | +# Prerequisites (already present in this repo's CI): |
| 13 | +# - LuCLI install recipe mirrors .github/workflows/pr.yml (cybersonic/LuCLI release). |
| 14 | +# - Java 21 via actions/setup-java@v4. |
| 15 | +# |
| 16 | +# Gating model: |
| 17 | +# 1. cli-tests - runs `tools/test-cli-local.sh`, must be 365+/0/0. |
| 18 | +# 2. deploy-config-diff - informational (`continue-on-error: true`). |
| 19 | +# The script expects Ruby Kamal on PATH *and* a routable `wheels deploy`. |
| 20 | +# Neither is wired in CI yet, so this step's exit 1 is expected and |
| 21 | +# non-gating until the `wheels` binary routes to this worktree's Module.cfc. |
| 22 | +# 3. deploy-verb-smoke - calls `tools/deploy-verb-smoke.sh`, which already |
| 23 | +# exits 0 with a warning when `wheels deploy` is unreachable. So this step |
| 24 | +# is a no-op today, and becomes a real gate automatically the moment the |
| 25 | +# LuCLI/Module.cfc routing lands. |
| 26 | +# |
| 27 | +# See `docs/superpowers/plans/2026-04-21-phase1-retrospective.md` for the |
| 28 | +# full deploy-gap write-up. |
| 29 | + |
| 30 | +name: Deploy Subsystem CI |
| 31 | + |
| 32 | +on: |
| 33 | + push: |
| 34 | + branches: [main, develop] |
| 35 | + paths: |
| 36 | + - 'cli/lucli/services/deploy/**' |
| 37 | + - 'cli/lucli/lib/deploy/**' |
| 38 | + - 'cli/lucli/templates/deploy/**' |
| 39 | + - 'cli/lucli/tests/_fixtures/deploy/**' |
| 40 | + - 'cli/lucli/tests/specs/deploy/**' |
| 41 | + - 'cli/lucli/tests/_helpers/DeployShellHelper.cfc' |
| 42 | + - 'cli/lucli/Module.cfc' |
| 43 | + - 'tools/deploy-*.sh' |
| 44 | + - 'tools/deploy-dry-run-normalize.py' |
| 45 | + - 'tools/test-cli-local.sh' |
| 46 | + - '.github/workflows/deploy-ci.yml' |
| 47 | + pull_request: |
| 48 | + paths: |
| 49 | + - 'cli/lucli/services/deploy/**' |
| 50 | + - 'cli/lucli/lib/deploy/**' |
| 51 | + - 'cli/lucli/templates/deploy/**' |
| 52 | + - 'cli/lucli/tests/_fixtures/deploy/**' |
| 53 | + - 'cli/lucli/tests/specs/deploy/**' |
| 54 | + - 'cli/lucli/tests/_helpers/DeployShellHelper.cfc' |
| 55 | + - 'cli/lucli/Module.cfc' |
| 56 | + - 'tools/deploy-*.sh' |
| 57 | + - 'tools/deploy-dry-run-normalize.py' |
| 58 | + - 'tools/test-cli-local.sh' |
| 59 | + - '.github/workflows/deploy-ci.yml' |
| 60 | + |
| 61 | +permissions: |
| 62 | + contents: read |
| 63 | + |
| 64 | +jobs: |
| 65 | + deploy-gate: |
| 66 | + name: "Deploy CLI tests + verb smoke" |
| 67 | + runs-on: ubuntu-latest |
| 68 | + env: |
| 69 | + FORCE_JAVASCRIPT_ACTIONS_TO_NODE24: true |
| 70 | + LUCLI_VERSION: "0.3.3" |
| 71 | + WHEELS_CI: "true" |
| 72 | + PORT: "8080" |
| 73 | + steps: |
| 74 | + - uses: actions/checkout@v5 |
| 75 | + |
| 76 | + - name: Set up JDK 21 |
| 77 | + uses: actions/setup-java@v4 |
| 78 | + with: |
| 79 | + distribution: 'temurin' |
| 80 | + java-version: '21' |
| 81 | + |
| 82 | + - name: Install LuCLI |
| 83 | + run: | |
| 84 | + curl -sL "https://github.com/cybersonic/LuCLI/releases/download/v${LUCLI_VERSION}/lucli-${LUCLI_VERSION}-linux" \ |
| 85 | + -o /usr/local/bin/lucli |
| 86 | + chmod +x /usr/local/bin/lucli |
| 87 | + lucli --version |
| 88 | +
|
| 89 | + - name: Create test databases |
| 90 | + run: | |
| 91 | + sudo apt-get update -y && sudo apt-get install -y --no-install-recommends sqlite3 |
| 92 | + sqlite3 wheelstestdb.db "SELECT 1;" |
| 93 | + sqlite3 wheelstestdb_tenant_b.db "SELECT 1;" |
| 94 | +
|
| 95 | + - name: Run CLI test suite |
| 96 | + run: bash tools/test-cli-local.sh |
| 97 | + |
| 98 | + - name: Run deploy-config-diff (informational) |
| 99 | + continue-on-error: true |
| 100 | + run: | |
| 101 | + bash tools/deploy-config-diff.sh \ |
| 102 | + || echo "deploy-config-diff: informational, non-gating (expected until 'wheels deploy' routes in CI)" |
| 103 | +
|
| 104 | + - name: Run deploy-verb-smoke (gates when wheels deploy reachable) |
| 105 | + run: bash tools/deploy-verb-smoke.sh |
| 106 | + |
| 107 | + - name: Debug server logs |
| 108 | + if: failure() |
| 109 | + run: | |
| 110 | + cat /tmp/wheels-cli-test-server.log 2>/dev/null || true |
0 commit comments