Nightly Install Check #172
Workflow file for this run
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: Nightly Install Check | |
| on: | |
| schedule: | |
| - cron: "30 3 * * *" # 03:30 UTC daily (30 min after UAT) | |
| workflow_dispatch: {} | |
| permissions: | |
| contents: read | |
| jobs: | |
| fresh-install: | |
| strategy: | |
| matrix: | |
| os: [ubuntu-latest, macos-latest] | |
| python-version: ["3.12", "3.13", "3.14"] | |
| runs-on: ${{ matrix.os }} | |
| timeout-minutes: 10 | |
| steps: | |
| - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 | |
| - uses: astral-sh/setup-uv@20cfd1bf945f4377ade1205e4dbc17946fc9a30d # v10.0.1 | |
| with: | |
| python-version: ${{ matrix.python-version }} | |
| - name: Install from source | |
| run: uv sync --locked --all-packages --group dev | |
| - name: Run studyloop doctor | |
| run: | | |
| output=$(uv run studyloop doctor --json) || true | |
| echo "$output" | python3 -c " | |
| import json, sys | |
| checks = json.load(sys.stdin) | |
| failed = [c for c in checks if c['status'] == 'fail'] | |
| warned = [c for c in checks if c['status'] == 'warn'] | |
| passed = [c for c in checks if c['status'] == 'pass'] | |
| skipped = [c for c in checks if c['status'] == 'skip'] | |
| print(f'Doctor: {len(passed)} passed, {len(warned)} warned, {len(skipped)} skipped, {len(failed)} failed') | |
| for f in failed: | |
| print(f' FAIL: {f[\"category\"]}/{f[\"name\"]} — {f[\"message\"]}') | |
| # Fail CI on core/database/config failures; warnings are acceptable | |
| # (e.g. missing optional tmux, agents, or voice deps on CI) | |
| core_fails = [f for f in failed if f['category'] in ('core', 'database', 'config')] | |
| if core_fails: | |
| print(f'::error::{len(core_fails)} core check(s) failed') | |
| sys.exit(1) | |
| " | |
| - name: Verify CLI entry point | |
| run: uv run studyloop --version | |
| - name: Verify agent-session-tools entry point | |
| run: uv run session-export --help | |
| # A4: the real `uv tool install` path -- the one a fresh clone's | |
| # ./scripts/install.sh actually uses -- otherwise has zero execution | |
| # coverage anywhere in CI. This runs it for real, into a scratch tool | |
| # dir, and proves the two global console scripts it installs work. | |
| installer: | |
| runs-on: ubuntu-latest | |
| timeout-minutes: 30 | |
| steps: | |
| - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 | |
| - uses: astral-sh/setup-uv@20cfd1bf945f4377ade1205e4dbc17946fc9a30d # v10.0.1 | |
| with: | |
| python-version: "3.12" | |
| - name: Run scripts/install.sh | |
| # HOME is isolated because `studyloop install agents` writes into it | |
| # (~/.kiro, ~/.claude, ~/.codex, ~/.config/opencode). With a fresh HOME | |
| # there is no Python 3.12 either, so this also exercises the script's | |
| # `uv python install` fallback every night. | |
| # | |
| # The script refuses, by design, when no supported AI tool is present | |
| # ("No supported AI tools detected"), and the runner has none: no | |
| # harness binary on PATH and nothing in the fresh HOME. So the fixture | |
| # plants the four harness markers `detect_available_agent_tools()` | |
| # reads without a binary -- ~/.kiro, ~/.claude, ~/.pi, ~/.grok -- and | |
| # the install-agents step then exercises all four link sets for real. | |
| # (Without this the job failed every night from 2026-09-15, before its | |
| # verify steps ever ran; pinned by test_ci_workflow_contract.py.) | |
| env: | |
| HOME: ${{ runner.temp }}/home | |
| UV_TOOL_DIR: ${{ runner.temp }}/tools | |
| UV_TOOL_BIN_DIR: ${{ runner.temp }}/bin | |
| run: | | |
| mkdir -p "$HOME/.kiro" "$HOME/.claude" "$HOME/.pi" "$HOME/.grok" | |
| ./scripts/install.sh --non-interactive --no-smoke | |
| - name: Verify installed CLI entry points | |
| env: | |
| UV_TOOL_BIN_DIR: ${{ runner.temp }}/bin | |
| run: | | |
| "$UV_TOOL_BIN_DIR/studyloop" --version | |
| "$UV_TOOL_BIN_DIR/session-export" --help | |
| - name: Verify installed agent definitions | |
| # One artefact per planted harness, each a path `install agents` | |
| # writes for that tool (installers.py _TOOL_LINKS / _configure_*). | |
| env: | |
| HOME: ${{ runner.temp }}/home | |
| run: | | |
| test -e "$HOME/.kiro/agents/study-mentor.json" | |
| test -e "$HOME/.kiro/agents/study-plan-architect.json" | |
| test -e "$HOME/.claude/agents/socratic-mentor.md" | |
| test -e "$HOME/.claude/agents/study-plan-architect.md" | |
| test -e "$HOME/.pi/agent/AGENTS.md" | |
| test -e "$HOME/.grok/hooks/studyloop.json" | |
| test -e "$HOME/.grok/rules/session-db.md" |