CMA Agent example and bounded tokens (#11) #95
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: | |
| pull_request: | |
| branches: [main, develop] | |
| push: | |
| branches: [main] | |
| concurrency: | |
| group: ci-${{ github.ref }} | |
| cancel-in-progress: true | |
| jobs: | |
| test: | |
| name: Lint, Build & Test | |
| runs-on: ubuntu-latest | |
| permissions: | |
| contents: read | |
| actions: read | |
| services: | |
| mongodb: | |
| image: mongo:8 | |
| ports: | |
| - 27017:27017 | |
| options: >- | |
| --health-cmd "mongosh --eval 'db.runCommand({ ping: 1 })'" | |
| --health-interval 10s | |
| --health-timeout 5s | |
| --health-retries 5 | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v4 | |
| with: | |
| fetch-depth: 0 # needed for nx affected | |
| - name: Setup Node.js | |
| uses: actions/setup-node@v4 | |
| with: | |
| node-version: 20 | |
| cache: npm | |
| - name: Install dependencies | |
| run: npm ci --legacy-peer-deps | |
| - name: Derive SHAs for nx affected | |
| uses: nrwl/nx-set-shas@v4 | |
| # ── Lint ──────────────────────────────────────────────────────────────── | |
| - name: Lint (affected) | |
| run: npx nx affected --target=lint --parallel=1 --verbose --output-style=stream | |
| # ── Build ─────────────────────────────────────────────────────────────── | |
| - name: Build (affected) | |
| run: npx nx affected --target=build --parallel=3 --verbose --output-style=stream | |
| # ── Test ──────────────────────────────────────────────────────────────── | |
| - name: Test (affected) | |
| run: npx nx affected --target=test --parallel=1 --verbose --output-style=stream --forceExit --passWithNoTests | |
| env: | |
| # No real LLM key in CI — compliance tests use structural-check-only mode | |
| COMPLIANCE_LLM_API_KEY: "" | |
| MONGODB_URI: mongodb://localhost:27017/wuselverse-test | |
| e2e: | |
| name: E2E Tests | |
| runs-on: ubuntu-latest | |
| needs: test # Run after main tests pass | |
| services: | |
| mongodb: | |
| image: mongo:8 | |
| ports: | |
| - 27017:27017 | |
| options: >- | |
| --health-cmd "mongosh --eval 'db.runCommand({ ping: 1 })'" | |
| --health-interval 10s | |
| --health-timeout 5s | |
| --health-retries 5 | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v4 | |
| - name: Setup Node.js | |
| uses: actions/setup-node@v4 | |
| with: | |
| node-version: 20 | |
| cache: npm | |
| - name: Install dependencies | |
| run: npm ci --legacy-peer-deps | |
| - name: Run E2E tests | |
| run: npm run test:e2e | |
| env: | |
| MONGODB_URI: mongodb://localhost:27017/wuselverse-test | |
| PLATFORM_API_KEY: platform_test_key_12345 | |
| PORT: 3099 | |
| COMPLIANCE_LLM_API_KEY: "" |