fix(ci): scope build and test to library packages only #323
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 | |
| push: | |
| branches: | |
| - main | |
| env: | |
| TURBO_CACHE_DIR: .turbo | |
| jobs: | |
| lint: | |
| name: Lint | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout Repo | |
| uses: actions/checkout@v4 | |
| - name: Setup Bun | |
| uses: oven-sh/setup-bun@v2 | |
| with: | |
| bun-version: latest | |
| - name: Cache Turbo | |
| uses: actions/cache@v4 | |
| with: | |
| path: .turbo | |
| key: turbo-lint-${{ runner.os }}-${{ hashFiles('**/bun.lock') }}-${{ github.sha }} | |
| restore-keys: | | |
| turbo-lint-${{ runner.os }}-${{ hashFiles('**/bun.lock') }}- | |
| turbo-lint-${{ runner.os }}- | |
| - name: Install Dependencies | |
| run: bun install --frozen-lockfile | |
| - name: Run ESLint | |
| run: bun run lint | |
| - name: Check Formatting | |
| run: bun run format:check | |
| typecheck: | |
| name: Type Check | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout Repo | |
| uses: actions/checkout@v4 | |
| - name: Setup Bun | |
| uses: oven-sh/setup-bun@v2 | |
| with: | |
| bun-version: latest | |
| - name: Cache Turbo | |
| uses: actions/cache@v4 | |
| with: | |
| path: .turbo | |
| key: turbo-typecheck-${{ runner.os }}-${{ hashFiles('**/bun.lock') }}-${{ github.sha }} | |
| restore-keys: | | |
| turbo-typecheck-${{ runner.os }}-${{ hashFiles('**/bun.lock') }}- | |
| turbo-typecheck-${{ runner.os }}- | |
| - name: Install Dependencies | |
| run: bun install --frozen-lockfile | |
| - name: Run TypeScript Type Check | |
| run: bun run typecheck | |
| build: | |
| name: Build | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout Repo | |
| uses: actions/checkout@v4 | |
| - name: Setup Bun | |
| uses: oven-sh/setup-bun@v2 | |
| with: | |
| bun-version: latest | |
| - name: Cache Turbo | |
| uses: actions/cache@v4 | |
| with: | |
| path: .turbo | |
| key: turbo-build-${{ runner.os }}-${{ hashFiles('**/bun.lock') }}-${{ github.sha }} | |
| restore-keys: | | |
| turbo-build-${{ runner.os }}-${{ hashFiles('**/bun.lock') }}- | |
| turbo-build-${{ runner.os }}- | |
| - name: Install Dependencies | |
| run: bun install --frozen-lockfile | |
| - name: Build Library Packages | |
| run: bunx turbo build --filter='./packages/*' | |
| - name: Check Build Artifacts | |
| run: | | |
| for pkg in packages/core packages/agentx packages/node-platform packages/server packages/claude-driver packages/mono-driver packages/devtools; do | |
| if [ -d "$pkg/dist" ]; then | |
| echo "✅ $pkg built successfully" | |
| else | |
| echo "❌ $pkg build failed - no dist directory" | |
| exit 1 | |
| fi | |
| done | |
| test: | |
| name: Test | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout Repo | |
| uses: actions/checkout@v4 | |
| - name: Setup Bun | |
| uses: oven-sh/setup-bun@v2 | |
| with: | |
| bun-version: latest | |
| - name: Cache Turbo | |
| uses: actions/cache@v4 | |
| with: | |
| path: .turbo | |
| key: turbo-test-${{ runner.os }}-${{ hashFiles('**/bun.lock') }}-${{ github.sha }} | |
| restore-keys: | | |
| turbo-test-${{ runner.os }}-${{ hashFiles('**/bun.lock') }}- | |
| turbo-test-${{ runner.os }}- | |
| - name: Install Dependencies | |
| run: bun install --frozen-lockfile | |
| - name: Build (required for tests) | |
| run: bunx turbo build --filter='./packages/*' | |
| - name: Run Unit Tests | |
| run: bunx turbo test --filter='./packages/*' | |
| - name: Run BDD Tests | |
| run: bun run test:bdd |