Add live provider test contracts #85
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: | |
| workflow_dispatch: | |
| inputs: | |
| live_api_providers: | |
| description: "Comma-separated providers for the live API job; blank means all API-backed providers" | |
| required: false | |
| default: "" | |
| live_api_capabilities: | |
| description: "Comma-separated capabilities for the live API job" | |
| required: false | |
| default: "search,contents,answer" | |
| schedule: | |
| - cron: "23 4 * * 1" | |
| permissions: | |
| contents: read | |
| jobs: | |
| format: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v6 | |
| - name: Setup Node.js | |
| uses: actions/setup-node@v6 | |
| with: | |
| node-version: "24" | |
| cache: "npm" | |
| - name: Install dependencies | |
| run: npm ci | |
| - name: Check formatting | |
| run: npm run format:check | |
| test: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v6 | |
| - name: Setup Node.js | |
| uses: actions/setup-node@v6 | |
| with: | |
| node-version: "24" | |
| cache: "npm" | |
| - name: Install dependencies | |
| run: npm ci | |
| - name: Run tests | |
| run: npm run test:ci | |
| live-api: | |
| if: github.event_name != 'pull_request' || github.event.pull_request.head.repo.full_name == github.repository | |
| runs-on: ubuntu-latest | |
| timeout-minutes: 45 | |
| env: | |
| LIVE_API_TESTS: "1" | |
| LIVE_API_PROVIDERS: ${{ github.event_name == 'workflow_dispatch' && inputs.live_api_providers || '' }} | |
| LIVE_API_CAPABILITIES: ${{ github.event_name == 'workflow_dispatch' && inputs.live_api_capabilities || 'search,contents,answer' }} | |
| BRAVE_SEARCH_API_KEY: ${{ secrets.BRAVE_SEARCH_API_KEY }} | |
| BRAVE_ANSWERS_API_KEY: ${{ secrets.BRAVE_ANSWERS_API_KEY }} | |
| CLOUDFLARE_API_TOKEN: ${{ secrets.CLOUDFLARE_API_TOKEN }} | |
| CLOUDFLARE_ACCOUNT_ID: ${{ secrets.CLOUDFLARE_ACCOUNT_ID }} | |
| EXA_API_KEY: ${{ secrets.EXA_API_KEY }} | |
| FIRECRAWL_API_KEY: ${{ secrets.FIRECRAWL_API_KEY }} | |
| GOOGLE_API_KEY: ${{ secrets.GOOGLE_API_KEY }} | |
| LINKUP_API_KEY: ${{ secrets.LINKUP_API_KEY }} | |
| OLLAMA_API_KEY: ${{ secrets.OLLAMA_API_KEY }} | |
| OPENAI_API_KEY: ${{ secrets.OPENAI_API_KEY }} | |
| PARALLEL_API_KEY: ${{ secrets.PARALLEL_API_KEY }} | |
| PERPLEXITY_API_KEY: ${{ secrets.PERPLEXITY_API_KEY }} | |
| SERPER_API_KEY: ${{ secrets.SERPER_API_KEY }} | |
| TAVILY_API_KEY: ${{ secrets.TAVILY_API_KEY }} | |
| VALYU_API_KEY: ${{ secrets.VALYU_API_KEY }} | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v6 | |
| - name: Setup Node.js | |
| uses: actions/setup-node@v6 | |
| with: | |
| node-version: "24" | |
| cache: "npm" | |
| - name: Install dependencies | |
| run: npm ci | |
| - name: Run live API tests | |
| run: npm run test:live |