Skip to content

fix(hooks): prevent circuit breaker false positives on deliberate rollbacks #534

fix(hooks): prevent circuit breaker false positives on deliberate rollbacks

fix(hooks): prevent circuit breaker false positives on deliberate rollbacks #534

Workflow file for this run

name: CI
on:
push:
branches: [main]
pull_request:
branches: [main]
jobs:
lint:
name: Lint
runs-on: ubuntu-latest
timeout-minutes: 5
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Set up Node.js
uses: actions/setup-node@v4
with:
node-version: '22'
- name: Verify lockfile sync
run: |
PKG=$(node -p "require('./package.json').version")
LOCK=$(node -p "require('./package-lock.json').version")
if [ "$PKG" != "$LOCK" ]; then
echo "ERROR: package.json ($PKG) != package-lock.json ($LOCK)"
echo "Fix: npm install --package-lock-only && commit package-lock.json"
exit 1
fi
echo "Lockfile synced: $PKG"
- name: Install dependencies
run: npm ci --ignore-scripts || npm install --ignore-scripts
- name: Build artifacts
run: npm run build:hooks && npm run build:machines
- name: Check assets not stale
run: npm run check:assets
- name: Lint (isolation check)
run: npm run lint:isolation
test:
needs: lint
name: Unit tests (Node ${{ matrix.node }})
runs-on: ubuntu-latest
timeout-minutes: 5
strategy:
fail-fast: false
matrix:
node: ['18', '20', '22']
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Set up Node.js
uses: actions/setup-node@v4
with:
node-version: ${{ matrix.node }}
- name: Install dependencies
run: npm ci --ignore-scripts || npm install --ignore-scripts
- name: Build artifacts
run: npm run build:hooks && npm run build:machines
- name: Run CI tests
run: npm run test:ci
- name: Run TUI unit tests
if: matrix.node != '18'
run: npm run test:tui
- name: Verify package contents
run: |
echo "=== Package dry-run ==="
npm pack --dry-run 2>&1 | grep -E 'total files|package size|📦'
echo ""
echo "=== Checking for test files ==="
count=$(npm pack --dry-run 2>&1 | grep -c '\.test\.' || true)
if [ "$count" -gt 0 ]; then
echo "ERROR: $count test files found in package"
exit 1
fi
echo "OK: 0 test files in package"