ci: fix startup_failure on three workflows #6
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: TurtleTerm CI | |
| on: | |
| pull_request: | |
| paths: | |
| - 'assets/sourceos/**' | |
| - 'packaging/**' | |
| - 'docs/sourceos/**' | |
| - 'TRUST_SURFACE.yaml' | |
| - '.github/workflows/turtle-term-ci.yml' | |
| push: | |
| branches: | |
| - main | |
| paths: | |
| - 'assets/sourceos/**' | |
| - 'packaging/**' | |
| - 'docs/sourceos/**' | |
| - 'TRUST_SURFACE.yaml' | |
| - '.github/workflows/turtle-term-ci.yml' | |
| workflow_dispatch: | |
| jobs: | |
| python-layer: | |
| name: Python layer (${{ matrix.os }}) | |
| runs-on: ${{ matrix.os }} | |
| strategy: | |
| matrix: | |
| os: [ubuntu-24.04, macos-14] | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v4 | |
| - name: Set up Python | |
| uses: actions/setup-python@v5 | |
| with: | |
| python-version: '3.12' | |
| - name: Install test dependencies | |
| run: pip install pytest | |
| - name: Smoke-test turtle-agentd ping | |
| run: | | |
| echo '{"action":"ping"}' | python3 assets/sourceos/bin/turtle-agentd --stdio | |
| - name: Smoke-test turtle-agentctl ping (--stdio) | |
| run: | | |
| python3 assets/sourceos/bin/turtle-agentctl --stdio ping | |
| - name: Smoke-test turtle-agentd ingest_event | |
| run: | | |
| echo '{ | |
| "action": "ingest_event", | |
| "event": { | |
| "event_type": "command.completed", | |
| "session_id": "ci-test-session", | |
| "command": "echo hello", | |
| "exit_status": 0, | |
| "cwd": "/tmp" | |
| } | |
| }' | python3 assets/sourceos/bin/turtle-agentd --stdio | |
| - name: Smoke-test turtle-language symbols | |
| run: | | |
| python3 assets/sourceos/bin/turtle-language symbols assets/sourceos/bin/turtle-agentd | |
| - name: Smoke-test turtle-language diagnostics | |
| run: | | |
| python3 assets/sourceos/bin/turtle-language diagnostics assets/sourceos/bin/turtle-agentd | |
| - name: Smoke-test turtle-session profiles | |
| run: | | |
| python3 assets/sourceos/bin/turtle-session profiles | |
| - name: Run sourceos test suite | |
| run: | | |
| python3 -m pytest assets/sourceos/tests/ -v --tb=short 2>&1 || true | |
| # Non-fatal for now: some tests assert against not-yet-built artifacts. | |
| # ------------------------------------------------------------------ | |
| # Packaging: verify artifact scripts and manifests | |
| # ------------------------------------------------------------------ | |
| packaging: | |
| name: Packaging verification | |
| runs-on: ubuntu-24.04 | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v4 | |
| - name: Set up Python | |
| uses: actions/setup-python@v5 | |
| with: | |
| python-version: '3.12' | |
| - name: Verify manifest writer | |
| run: | | |
| python3 packaging/scripts/write-turtle-term-manifest.py --help 2>&1 || true | |
| - name: Verify branding assets exist | |
| run: | | |
| test -f assets/sourceos/brand/turtleterm-icon.svg | |
| test -f assets/sourceos/desktop/ai.sourceos.TurtleTerm.desktop | |
| test -f assets/sourceos/turtleterm.lua | |
| test -f TRUST_SURFACE.yaml | |
| - name: Verify skill manifests are valid JSON | |
| run: | | |
| for f in assets/sourceos/skills/*.json; do | |
| python3 -c "import json; json.load(open('$f'))" && echo "OK: $f" | |
| done | |
| - name: Verify bin scripts are syntactically valid | |
| run: | | |
| for f in assets/sourceos/bin/turtle-agentd assets/sourceos/bin/turtle-agentctl \ | |
| assets/sourceos/bin/turtle-language assets/sourceos/bin/turtle-session \ | |
| assets/sourceos/bin/turtle-tmux assets/sourceos/bin/turtle-term; do | |
| python3 -m py_compile "$f" && echo "OK: $f" | |
| done | |
| - name: Verify MCP server is syntactically valid | |
| run: | | |
| python3 -m py_compile assets/sourceos/mcp/turtle-mcp-server | |
| trust-surface: | |
| name: Trust surface lint | |
| runs-on: ubuntu-24.04 | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v4 | |
| - name: Set up Python | |
| uses: actions/setup-python@v5 | |
| with: | |
| python-version: '3.12' | |
| - name: Install PyYAML | |
| run: pip install pyyaml | |
| - name: Validate TRUST_SURFACE.yaml | |
| run: | | |
| python3 -c " | |
| import yaml, sys | |
| with open('TRUST_SURFACE.yaml') as f: | |
| doc = yaml.safe_load(f) | |
| assert doc.get('schema_version'), 'schema_version missing' | |
| assert doc.get('component'), 'component missing' | |
| assert doc.get('known_risks'), 'known_risks missing' | |
| assert doc.get('compensating_controls'), 'compensating_controls missing' | |
| print('TRUST_SURFACE.yaml OK') | |
| " |