Improve workflow kit validation and tests #9
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: CI | |
| on: | |
| push: | |
| branches: ["main"] | |
| pull_request: | |
| jobs: | |
| smoke: | |
| name: Smoke (${{ matrix.os }}, py${{ matrix.python-version }}) | |
| runs-on: ${{ matrix.os }} | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| os: [ubuntu-latest, windows-latest] | |
| python-version: ["3.10", "3.11", "3.12", "3.13"] | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v4 | |
| - name: Setup Python | |
| uses: actions/setup-python@v5 | |
| with: | |
| python-version: ${{ matrix.python-version }} | |
| - name: Show Python version | |
| run: python --version | |
| - name: Run unit tests | |
| run: python -B -m unittest discover -s tests -v | |
| - name: Bootstrap dry run | |
| run: python tools/bootstrap.py --target bootstrap-test --dry-run | |
| - name: Validate workflow templates | |
| run: python tools/validate_workflow.py --memory-dir memory | |
| - name: Scan project | |
| run: python tools/scan_project.py --target . --output scan-summary.json | |
| - name: Generate draft index | |
| run: python tools/init_index.py --target . --output CODEBASE_INDEX.generated.md | |
| - name: Generate draft test index | |
| run: python tools/init_test_index.py --target . --output TEST_INDEX.generated.md | |
| - name: Generate draft change areas | |
| run: python tools/init_change_areas.py --target . --output CHANGE_AREAS.generated.md | |
| - name: Explain scan | |
| run: python tools/explain_scan.py --target . --format markdown --output SCAN_EXPLANATION.md | |
| - name: Copy canonical index for refresh smoke test | |
| run: > | |
| python -c | |
| "from pathlib import Path; src = Path('CODEBASE_INDEX.md'); dst = Path('CODEBASE_INDEX.smoke.md'); | |
| dst.write_text(src.read_text(encoding='utf-8'), encoding='utf-8', newline='\n')" | |
| - name: Refresh canonical index | |
| run: python tools/refresh_index.py --target . --index CODEBASE_INDEX.smoke.md | |
| - name: Scaffold task | |
| run: > | |
| python tools/scaffold_task.py | |
| --memory-dir memory | |
| --goal "CI smoke check" | |
| --done-criteria "Smoke commands complete successfully" | |
| --scope "tools/, memory/" | |
| --tests "python tools/validate_workflow.py --memory-dir memory" | |
| --next-step "Run the remaining CLI commands" | |
| --delegate "none" | |
| - name: Create handoff | |
| run: > | |
| python tools/create_handoff.py | |
| --memory-dir memory | |
| --role reviewer | |
| --objective "Review CI smoke workflow wording" | |
| --owned-files "README.md, tools/README.md" | |
| --out-of-scope "Python implementation" | |
| - name: Acceptance check | |
| run: > | |
| python tools/acceptance_check.py | |
| --scope | |
| --behavior | |
| --verification | |
| --regression | |
| --memory | |
| - name: Close task | |
| run: > | |
| python tools/close_task.py | |
| --memory-dir memory | |
| --task "CI smoke check" | |
| --files "tools/, memory/" | |
| --verification "validate_workflow + acceptance_check" | |
| --risk "No major risk in smoke mode" | |
| - name: Validate workflow templates again | |
| run: python tools/validate_workflow.py --memory-dir memory |