feat(ts-sdk): batch outputs (JSON/HTML/CSV) + family-aware CLI with non-interactive mode #413
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: 🏗️ Test TypeScript SDK | |
| on: | |
| push: | |
| branches: | |
| - main | |
| paths: | |
| - 'sdks/typescript/**' | |
| - 'evals/prompts/**' | |
| - '.github/workflows/test-sdk-typescript.yml' | |
| pull_request: | |
| paths: | |
| - 'sdks/typescript/**' | |
| - 'evals/prompts/**' | |
| - '.github/workflows/test-sdk-typescript.yml' | |
| permissions: | |
| contents: read | |
| concurrency: | |
| group: ${{ github.workflow }}-${{ github.ref }} | |
| cancel-in-progress: true | |
| jobs: | |
| lint: | |
| name: 👖 Lint | |
| runs-on: ubuntu-latest | |
| defaults: | |
| run: | |
| working-directory: sdks/typescript | |
| steps: | |
| - name: ⬇️ Checkout repo | |
| uses: actions/checkout@v7 | |
| - name: 😻 Setup Node.js 22 | |
| uses: actions/setup-node@v7 | |
| with: | |
| node-version: 22 | |
| - name: 📥 Install dependencies | |
| uses: bahmutov/npm-install@v1 | |
| with: | |
| working-directory: sdks/typescript | |
| - name: 👖 Run linter | |
| run: npm run lint | |
| typecheck: | |
| name: 🔎 TypeScript | |
| runs-on: ubuntu-latest | |
| defaults: | |
| run: | |
| working-directory: sdks/typescript | |
| steps: | |
| - name: ⬇️ Checkout repo | |
| uses: actions/checkout@v7 | |
| - name: 😻 Setup Node.js 22 | |
| uses: actions/setup-node@v7 | |
| with: | |
| node-version: 22 | |
| - name: 📥 Install dependencies | |
| uses: bahmutov/npm-install@v1 | |
| with: | |
| working-directory: sdks/typescript | |
| - name: 🔎 Type check | |
| run: npm run typecheck | |
| test: | |
| name: ⚡ Unit Tests (Node ${{ matrix.node-version }}) | |
| runs-on: ubuntu-latest | |
| defaults: | |
| run: | |
| working-directory: sdks/typescript | |
| strategy: | |
| matrix: | |
| node-version: ['20.19.0', '22', '24'] | |
| steps: | |
| - name: ⬇️ Checkout repo | |
| uses: actions/checkout@v7 | |
| - name: 😻 Setup Node.js ${{ matrix.node-version }} | |
| uses: actions/setup-node@v7 | |
| with: | |
| node-version: ${{ matrix.node-version }} | |
| - name: 📥 Install dependencies | |
| uses: bahmutov/npm-install@v1 | |
| with: | |
| working-directory: sdks/typescript | |
| - name: ⚡ Run unit tests | |
| run: npm run test:unit | |
| build: | |
| name: 🏗️ Build (Node ${{ matrix.node-version }}) | |
| needs: [lint, typecheck, test] | |
| runs-on: ubuntu-latest | |
| defaults: | |
| run: | |
| working-directory: sdks/typescript | |
| strategy: | |
| matrix: | |
| node-version: ['20.19.0', '22', '24'] | |
| steps: | |
| - name: ⬇️ Checkout repo | |
| uses: actions/checkout@v7 | |
| - name: 😻 Setup Node.js ${{ matrix.node-version }} | |
| uses: actions/setup-node@v7 | |
| with: | |
| node-version: ${{ matrix.node-version }} | |
| - name: 📥 Install dependencies | |
| uses: bahmutov/npm-install@v1 | |
| with: | |
| working-directory: sdks/typescript | |
| - name: 🏗️ Build package | |
| run: npm run build | |
| # Temporarily disabled - integration tests take too long in CI | |
| # - name: ⚡ Run integration tests (against dist/) | |
| # if: github.event_name == 'push' || github.event.pull_request.head.repo.full_name == github.repository | |
| # env: | |
| # RUN_INTEGRATION_TESTS: true | |
| # OPENAI_API_KEY: ${{ secrets.OPENAI_API_KEY }} | |
| # GOOGLE_API_KEY: ${{ secrets.GOOGLE_API_KEY }} | |
| # run: npm run test:integration:dist | |
| coverage: | |
| name: 📊 Coverage | |
| needs: [build] | |
| runs-on: ubuntu-latest | |
| defaults: | |
| run: | |
| working-directory: sdks/typescript | |
| steps: | |
| - name: ⬇️ Checkout repo | |
| uses: actions/checkout@v7 | |
| - name: 😻 Setup Node.js 22 | |
| uses: actions/setup-node@v7 | |
| with: | |
| node-version: 22 | |
| - name: 📥 Install dependencies | |
| uses: bahmutov/npm-install@v1 | |
| with: | |
| working-directory: sdks/typescript | |
| - name: 📊 Generate coverage report | |
| run: npm run test:coverage | |
| continue-on-error: true | |
| - name: 📁 Upload coverage to Codecov | |
| uses: codecov/codecov-action@v7 | |
| with: | |
| token: ${{ secrets.CODECOV_TOKEN }} | |
| files: ./sdks/typescript/coverage/coverage-final.json | |
| flags: typescript-sdk | |
| name: typescript-sdk-coverage | |
| continue-on-error: true |