Skip to content

feat(doctor): add INSTALLATION section for Homebrew distribution health #1917

feat(doctor): add INSTALLATION section for Homebrew distribution health

feat(doctor): add INSTALLATION section for Homebrew distribution health #1917

Workflow file for this run

name: CI Tests
on:
push:
branches: [main, dev]
pull_request:
branches: [main, dev]
jobs:
zsh-tests:
name: ZSH Plugin Tests
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v7
- name: Ensure zsh is installed
run: |
# zsh is preinstalled on ubuntu-latest; install only as a fallback.
# Replaces awalsh128/cache-apt-pkgs-action (pulled in deprecated
# Node.js 20 actions/cache/restore@v4) for a tiny preinstalled package.
if ! command -v zsh >/dev/null 2>&1; then
sudo apt-get update && sudo apt-get install -y zsh
fi
- name: Record start time
id: start
run: echo "time=$(date +%s)" >> $GITHUB_OUTPUT
- name: Create mock project structure
run: |
mkdir -p ~/projects/dev-tools/flow-cli/.git
mkdir -p ~/projects/r-packages/active/mediationverse/.git
mkdir -p ~/projects/r-packages/stable/rmediation/.git
mkdir -p ~/projects/teaching/stat-440/.git
mkdir -p ~/projects/research/mediation-planning/.git
mkdir -p ~/projects/quarto/manuscripts/paper1/.git
mkdir -p ~/projects/apps/examify/.git
cp -r . ~/projects/dev-tools/flow-cli/
- name: Run smoke tests
run: |
cd ~/projects/dev-tools/flow-cli
# Smoke tests only - run full suite locally with: ./tests/run-all.sh
zsh ./tests/test-flow.zsh
bash ./tests/test-install.sh
- name: Man-page version-sync guard
run: |
cd ~/projects/dev-tools/flow-cli
# Anti-drift: fail if any flow-cli man page .TH version != FLOW_VERSION
zsh ./tests/test-manpage-version-sync.zsh
- name: Performance Summary
if: always()
run: |
END_TIME=$(date +%s)
DURATION=$((END_TIME - ${{ steps.start.outputs.time }}))
echo "## 📊 ZSH Tests Performance" >> $GITHUB_STEP_SUMMARY
echo "| Metric | Value |" >> $GITHUB_STEP_SUMMARY
echo "|--------|-------|" >> $GITHUB_STEP_SUMMARY
echo "| Duration | ${DURATION}s |" >> $GITHUB_STEP_SUMMARY
# ---------------------------------------------------------------------------
# ci-full-suite-gate (Phase 3): the full 65-suite run-all.sh is now a BLOCKING
# gate. Service/tool-absent suites clean-skip via rc 77, so a non-zero exit
# means a real failure. Promoted to a required status check on dev (then main
# after a soak). The check name below ("Full Test Suite") must match the
# required-check name configured in branch protection.
# ---------------------------------------------------------------------------
full-suite:
name: Full Test Suite
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v7
- name: Ensure zsh is installed
run: |
if ! command -v zsh >/dev/null 2>&1; then
sudo apt-get update && sudo apt-get install -y zsh
fi
- name: Configure git identity
run: |
# Fresh runners have no git identity; suites that exercise the deploy
# workflow (teach-deploy) run `git commit` and fail with "empty ident"
# without it. This is CI environment provisioning, not a test change.
git config --global user.email "ci@flow-cli.test"
git config --global user.name "flow-cli CI"
git config --global init.defaultBranch main
- name: Record start time
id: start
run: echo "time=$(date +%s)" >> $GITHUB_OUTPUT
- name: Create mock project structure
run: |
mkdir -p ~/projects/dev-tools/flow-cli/.git
mkdir -p ~/projects/r-packages/active/mediationverse/.git
mkdir -p ~/projects/r-packages/stable/rmediation/.git
mkdir -p ~/projects/teaching/stat-440/.git
mkdir -p ~/projects/research/mediation-planning/.git
mkdir -p ~/projects/quarto/manuscripts/paper1/.git
mkdir -p ~/projects/apps/examify/.git
cp -r . ~/projects/dev-tools/flow-cli/
- name: Run full suite
id: fullsuite
run: |
cd ~/projects/dev-tools/flow-cli
set +e
# Capture run-all.sh output; tee returns 0, so grab run-all's real
# exit via PIPESTATUS (1=FAIL, 2=TIMEOUT, 0=clean) and re-exit with it
# so the job (a required check) fails the PR on a real failure.
./tests/run-all.sh 2>&1 | tee /tmp/full-suite.log
rc=${PIPESTATUS[0]}
echo "rc=$rc" >> "$GITHUB_OUTPUT"
echo "Full suite exit code: $rc"
exit "$rc"
- name: Full Suite Summary
if: always()
run: |
END_TIME=$(date +%s)
DURATION=$((END_TIME - ${{ steps.start.outputs.time }}))
{
echo "## 🧪 Full Suite (run-all.sh) — required gate"
echo ""
echo "| Metric | Value |"
echo "|--------|-------|"
echo "| Duration | ${DURATION}s |"
echo "| Exit code | \`${{ steps.fullsuite.outputs.rc }}\` (0=clean, 1=FAIL, 2=TIMEOUT) |"
echo ""
echo "<details><summary>Full run-all.sh output</summary>"
echo ""
echo '```'
cat /tmp/full-suite.log 2>/dev/null || echo "(no log captured)"
echo '```'
echo ""
echo "</details>"
} >> "$GITHUB_STEP_SUMMARY"