Commit2d2ea2cunknown_key
chore: install GateTest quality gate
3 files changed+116−02d2ea2cef16851b25e61fc5161d60e8ad7ea4d4d
3 changed files+116−0
Added.gatetest.json+6−0View fileUnifiedSplit
@@ -0,0 +1,6 @@
1{
2 "protected": true,
3 "gatetest_source": "https://github.com/ccantynz-alt/gatetest",
4 "do_not_remove": "This repo is protected by GateTest. See .github/workflows/gatetest-gate.yml and .husky/pre-push. Removing either breaks the quality gate. Requires Craig authorization.",
5 "integration_version": 1
6}
Added.github/workflows/gatetest-gate.yml+82−0View fileUnifiedSplit
@@ -0,0 +1,82 @@
1# ============================================================================
2# GATETEST QUALITY GATE — PROTECTED INTEGRATION FILE
3# ============================================================================
4# This workflow is a permanent integration between GateTest and a protected
5# platform (Crontech / Gluecron). It MUST NOT be removed, weakened, or
6# disabled without explicit authorization from Craig.
7#
8# See the GateTest Bible (CLAUDE.md) → "PROTECTED PLATFORMS" section.
9# Install location in target repo: .github/workflows/gatetest-gate.yml
10# Source of truth: https://github.com/ccantynz-alt/gatetest
11# /integrations/github-actions/gatetest-gate.yml
12# ============================================================================
13
14name: GateTest Quality Gate
15
16on:
17 push:
18 branches: [main, master]
19 pull_request:
20 branches: [main, master]
21
22permissions:
23 contents: read
24 pull-requests: write
25 security-events: write
26 checks: write
27
28concurrency:
29 group: gatetest-${{ github.ref }}
30 cancel-in-progress: true
31
32jobs:
33 gatetest:
34 name: GateTest — Quality Gate
35 runs-on: ubuntu-latest
36 timeout-minutes: 20
37 steps:
38 - name: Checkout target repository
39 uses: actions/checkout@v4
40 with:
41 fetch-depth: 0
42
43 - name: Setup Node.js
44 uses: actions/setup-node@v4
45 with:
46 node-version: '20'
47
48 - name: Clone GateTest (single source of truth)
49 run: |
50 git clone --depth 1 https://github.com/ccantynz-alt/gatetest.git "$RUNNER_TEMP/gatetest"
51 echo "GATETEST_HOME=$RUNNER_TEMP/gatetest" >> $GITHUB_ENV
52 echo "$RUNNER_TEMP/gatetest/bin" >> $GITHUB_PATH
53 chmod +x "$RUNNER_TEMP/gatetest/bin/gatetest.js"
54
55 - name: Verify GateTest installed
56 run: node "$GATETEST_HOME/bin/gatetest.js" --version
57
58 - name: GateTest — Quick (diff-mode) on PRs
59 if: github.event_name == 'pull_request'
60 run: node "$GATETEST_HOME/bin/gatetest.js" --suite quick --diff --sarif --junit --project "$GITHUB_WORKSPACE"
61
62 - name: GateTest — Full on main push
63 if: github.event_name == 'push'
64 run: node "$GATETEST_HOME/bin/gatetest.js" --suite full --sarif --junit --project "$GITHUB_WORKSPACE"
65
66 - name: Upload SARIF to GitHub Security
67 if: always()
68 continue-on-error: true
69 uses: github/codeql-action/upload-sarif@v3
70 with:
71 sarif_file: .gatetest/reports/gatetest-results.sarif
72 category: gatetest
73
74 - name: Upload GateTest reports
75 if: always()
76 uses: actions/upload-artifact@v4
77 with:
78 name: gatetest-reports-${{ github.run_id }}
79 path: |
80 .gatetest/reports/
81 retention-days: 30
82 if-no-files-found: ignore
Added.husky/pre-push+28−0View fileUnifiedSplit
@@ -0,0 +1,28 @@
1
2# ============================================================================
3# GATETEST PRE-PUSH HOOK — PROTECTED INTEGRATION FILE
4# ============================================================================
5# This hook blocks pushes from a protected platform (Crontech / Gluecron) to
6# their remotes if GateTest finds any error-severity issues.
7#
8# MUST NOT be removed, weakened, or bypassed without Craig's authorization.
9# See the GateTest Bible (CLAUDE.md) → "PROTECTED PLATFORMS" section.
10# Install location in target repo: .husky/pre-push (chmod +x)
11# Source of truth: https://github.com/ccantynz-alt/gatetest
12# /integrations/husky/pre-push
13# ============================================================================
14set -e
15
16GATETEST_CACHE="${GATETEST_CACHE:-$HOME/.cache/gatetest}"
17
18if [ ! -d "$GATETEST_CACHE/.git" ]; then
19 echo "[GateTest] Fetching latest GateTest into $GATETEST_CACHE ..."
20 mkdir -p "$(dirname "$GATETEST_CACHE")"
21 git clone --depth 1 https://github.com/ccantynz-alt/gatetest.git "$GATETEST_CACHE"
22else
23 echo "[GateTest] Updating local cache ..."
24 (cd "$GATETEST_CACHE" && git pull --ff-only --depth 1 origin HEAD >/dev/null 2>&1 || true)
25fi
26
27echo "[GateTest] Running quick diff-mode gate before push ..."
28node "$GATETEST_CACHE/bin/gatetest.js" --suite quick --diff --project "$(pwd)"
029