chore: add .gitignore for *.bak, remove stale .bak files, add CLI smo… #22
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: | |
| permissions: | |
| contents: read | |
| jobs: | |
| check: | |
| name: Check & Test | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - uses: oven-sh/setup-bun@v2 | |
| with: | |
| bun-version: latest | |
| - name: Install dependencies | |
| run: bun install --frozen-lockfile | |
| - name: Type check | |
| run: bun run check | |
| - name: Test | |
| run: bun test | |
| - name: Coverage | |
| run: bun run coverage | |
| - name: Coverage summary | |
| if: always() | |
| run: | | |
| env -u BRAINCODE_DEBUG -u BRAINCODE_DEBUG_FILE \ | |
| bun test --coverage --coverage-reporter=text > coverage-text.log 2>&1 || true | |
| { | |
| echo "### Coverage" | |
| echo '```' | |
| grep -E '^(-|[ ]*File|packages/|apps/|All files)' coverage-text.log || true | |
| echo '```' | |
| } >> "$GITHUB_STEP_SUMMARY" | |
| - name: Prepare report directory | |
| run: mkdir -p benchmarks/reports | |
| - name: Planning benchmark | |
| run: | | |
| bun run braincode -- benchmark --heuristic --json > benchmarks/reports/planning-benchmark.json | |
| { | |
| echo "### Planning benchmark (heuristic)" | |
| echo '```' | |
| bun run braincode -- benchmark --heuristic | |
| echo '```' | |
| } >> "$GITHUB_STEP_SUMMARY" | |
| - name: Execution benchmark | |
| run: | | |
| bun run braincode -- benchmark --execute --task login-validation --json > benchmarks/reports/execution-benchmark.json | |
| { | |
| echo "### Execution benchmark (login-validation)" | |
| echo '```' | |
| bun run braincode -- benchmark --execute --task login-validation | |
| echo '```' | |
| } >> "$GITHUB_STEP_SUMMARY" | |
| - name: Upload reports | |
| if: always() | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: ci-reports | |
| path: | | |
| benchmarks/reports/*.json | |
| coverage/lcov.info | |
| if-no-files-found: warn | |
| retention-days: 7 |