aien-local-stack
aien-dev/aien-local-stack
Brought by drakestapleton
aien-local-stack / .github / workflows / ci.yml
| 1 | name: Sovereign CI |
| 2 | |
| 3 | "on": |
| 4 | push: |
| 5 | branches: [main] |
| 6 | pull_request: |
| 7 | branches: [main] |
| 8 | workflow_dispatch: |
| 9 | |
| 10 | permissions: |
| 11 | contents: read |
| 12 | |
| 13 | jobs: |
| 14 | test: |
| 15 | name: Test & Invariant Verification |
| 16 | runs-on: ubuntu-latest |
| 17 | steps: |
| 18 | - name: Checkout AIEN Local Stack Source |
| 19 | uses: actions/checkout@v4 |
| 20 | with: |
| 21 | path: aien-local-stack |
| 22 | |
| 23 | - name: Checkout AIEN Protocols Dependency |
| 24 | uses: actions/checkout@v4 |
| 25 | with: |
| 26 | repository: aien-dev/aien-protocols |
| 27 | path: aien-protocols |
| 28 | |
| 29 | - name: Checkout Aegis Runtime Dependency |
| 30 | uses: actions/checkout@v4 |
| 31 | with: |
| 32 | repository: aien-dev/aegis-runtime |
| 33 | path: aegis-runtime |
| 34 | |
| 35 | - name: Checkout AIEN Sovereign Core Dependency |
| 36 | uses: actions/checkout@v4 |
| 37 | with: |
| 38 | repository: aien-dev/aien-sovereign-core |
| 39 | path: aien-sovereign-core |
| 40 | |
| 41 | - name: Install Stable Rust Toolchain |
| 42 | uses: dtolnay/rust-toolchain@stable |
| 43 | with: |
| 44 | components: rustfmt, clippy |
| 45 | |
| 46 | - name: Verify Code Formatting |
| 47 | working-directory: aien-local-stack |
| 48 | run: cargo fmt --all -- --check |
| 49 | |
| 50 | - name: Cargo Check |
| 51 | working-directory: aien-local-stack |
| 52 | run: cargo check --all-targets |
| 53 | |
| 54 | - name: Cargo Clippy Invariant |
| 55 | working-directory: aien-local-stack |
| 56 | run: cargo clippy --all-targets -- -D warnings |
| 57 | |
| 58 | - name: Run Workspace Unit and Integration Tests |
| 59 | working-directory: aien-local-stack |
| 60 | run: cargo test --verbose -- --test-threads=1 |
| 61 | |
| 62 | - name: Enforce Zero Disk Secrets Invariant |
| 63 | working-directory: aien-local-stack |
| 64 | run: | |
| 65 | echo "Auditing repository for prohibited plaintext secret files..." |
| 66 | if find . -maxdepth 4 -name ".env*" -not -path "*/.git/*" -not -path "*/target/*" | grep -q .; then |
| 67 | echo "::error::Prohibited plaintext .env file found. Use an approved AIEN SecretProvider." |
| 68 | exit 1 |
| 69 | fi |
| 70 | echo "Zero plaintext .env files verified." |
| 71 | |
| 72 | - name: Enforce Sovereign Voice and Anti-Slop Invariant |
| 73 | working-directory: aien-local-stack |
| 74 | run: | |
| 75 | echo "Auditing repository for em dashes, en dashes, and formulaic tropes..." |
| 76 | BAD_CHARS=$(grep -rnE --exclude-dir=target --exclude-dir=.git --exclude="*.rs" --exclude="*.json" --exclude="*.safetensors" "—|–" src/ tests/ README.md || true) |
| 77 | if [ -n "$BAD_CHARS" ]; then |
| 78 | echo "::error::Em dashes or en dashes detected:" |
| 79 | echo "$BAD_CHARS" |
| 80 | exit 1 |
| 81 | fi |
| 82 | echo "Sovereign voice compliance verified." |