-
Notifications
You must be signed in to change notification settings - Fork 22
130 lines (102 loc) · 5.29 KB
/
Copy pathci.yml
File metadata and controls
130 lines (102 loc) · 5.29 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
name: CI
on:
push:
branches: [main]
pull_request:
jobs:
test:
name: Python ${{ matrix.python-version }} on ${{ matrix.os }}
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest, windows-latest, macos-latest]
python-version: ["3.11", "3.12"]
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
- name: Install package
run: python -m pip install -e ".[dev]"
- name: Compile sources
run: python -m compileall -q minicode tests benchmarks Main Package
- name: AGENTS structure compliance
run: python -m minicode.structure_check --root . --hotspots 5 --max-dependency-upstream 4 --check-material-inventory --report .temp/structure-compliance.json
- name: AGENTS structure artifact gate
run: python -m minicode.release_readiness --check-structure-compliance-artifact .temp/structure-compliance.json
- name: Runtime readiness gate
run: python -m minicode.readiness --json
- name: Runtime readiness fallback examples
run: python -m minicode.readiness --examples-out .temp/readiness-fallback-examples.json
- name: Runtime readiness doctor
run: python -m minicode.readiness --doctor-out .temp/readiness-doctor.md
- name: Runtime readiness repair plan
run: python -m minicode.readiness --repair-plan-out .temp/readiness-repair-plan.json
- name: Runtime readiness patch preview
run: python -m minicode.readiness --patch-preview-out .temp/readiness-fallback-patch-preview.json
- name: Runtime readiness bundle
run: python -m minicode.readiness --bundle-out .temp/readiness-bundle
- name: Runtime readiness artifact redaction
run: >
python -m minicode.release_readiness --check-artifact-redaction
.temp/readiness-fallback-examples.json
.temp/readiness-doctor.md
.temp/readiness-repair-plan.json
.temp/readiness-fallback-patch-preview.json
- name: Runtime readiness artifact manifest
run: >
python -m minicode.release_readiness
--write-artifact-manifest .temp/readiness-artifact-manifest.json
--artifact fallback_examples_json=.temp/readiness-fallback-examples.json
--artifact doctor_markdown=.temp/readiness-doctor.md
--artifact repair_plan_json=.temp/readiness-repair-plan.json
--artifact patch_preview_json=.temp/readiness-fallback-patch-preview.json
- name: Runtime readiness artifact manifest gate
run: python -m minicode.release_readiness --check-artifact-manifest .temp/readiness-artifact-manifest.json
- name: Runtime readiness patch preview gate
run: python -m minicode.release_readiness --check-fallback-patch-preview .temp/readiness-fallback-patch-preview.json
- name: Runtime readiness fallback simulation gate
run: python -m minicode.release_readiness --check-fallback-simulation .temp/readiness-bundle/readiness-fallback-simulations.json
- name: Runtime fallback switch smoke
run: python -m minicode.release_readiness --check-fallback-switch-smoke
- name: Runtime readiness bundle manifest gate
run: python -m minicode.release_readiness --check-artifact-manifest .temp/readiness-bundle/readiness-artifact-manifest.json
- name: Runtime readiness bundle gate
run: python -m minicode.release_readiness --check-readiness-bundle .temp/readiness-bundle
- name: Lint (ruff)
run: |
python -m pip install ruff
python -m ruff check minicode/ --select=E,F --ignore=E501
- name: Type check (mypy baseline)
shell: bash
run: |
python -m pip install mypy
# Baseline: 225 errors. Gradual type hardening — fix real bugs, not just noise.
ERRORS=$(python -m mypy minicode/ --no-error-summary 2>&1 | grep -c "error:" || echo 0)
echo "mypy errors: $ERRORS (baseline 225)"
if [ "$ERRORS" -gt 225 ]; then
echo "FAIL: mypy errors increased above baseline"
exit 1
fi
- name: Run packaging smoke tests
run: python -m pytest tests/test_packaging.py -q
- name: Run AGENTS mirror tests
run: >
python -m pytest -q --import-mode=importlib
Main/MinicodeFrontline/Test/Application/Dto/AppProjection.Test.py
Main/MinicodeFrontline/Test/Application/Entry/MiniCodeFrontline.Test.py
Main/MinicodeFrontline/Test/Application/Entry/LocalCommandSurface.Test.py
Main/MinicodeFrontline/Test/Application/Entry/RuntimeLifecycleSurface.Test.py
Main/MinicodeFrontline/Test/Application/Query/CurrentRuntimeProjection.Test.py
Main/MinicodeFrontline/Test/Application/Query/RuntimeCapabilityInventory.Test.py
Package/EngineeringStructure/Test/Application/Query/ProductRootProjection.Test.py
Package/EngineeringStructure/Test/Application/Query/StructureCompliance.Test.py
- name: Run test suite
run: python -m pytest -q --tb=short
- name: Build and install package artifacts
run: |
python -m pip install build
python benchmarks/package_smoke.py