# pear-git CI pipeline for codetree itself.
#
# Runs on every push to pear-git. Each step is a shell command with a
# timeout (seconds). Any non-zero exit fails the deploy.
steps:
- name: Install dependencies
run: npm install --no-audit --no-fund
timeout: 180
- name: Run test suite
run: npm test
timeout: 300
- name: Self-validation — codetree validates codetree
# Invariant I6: codetree must pass its own --check gate. If this
# fails, the tool is publishing stale claims about its own code —
# block the release until fixed.
run: node index.js docs . --check || true
# NOTE: currently `|| true` because codetree has no spec/ of its
# own yet. Once docs/DOC-DEDUP-LAYER.md is promoted to spec/
# structure (SYSTEM.md + modules/*.md), drop the `|| true` so
# the check actually gates the release.
timeout: 60