chore(exports): export OAIExtended type #386
This file contains 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 | |
on: | |
pull_request_target: | |
branches: | |
- main | |
push: | |
branches: | |
- main | |
jobs: | |
test-main: | |
if: github.repository == 'instructor-ai/instructor-js' && github.ref == 'refs/heads/main' | |
name: run-tests | |
runs-on: ubuntu-latest | |
environment: TEST-MAIN | |
env: | |
OPENAI_API_KEY: ${{ secrets.OPENAI_API_KEY }} | |
ANYSCALE_API_KEY: ${{ secrets.ANYSCALE_API_KEY }} | |
TOGETHER_API_KEY: ${{ secrets.TOGETHER_API_KEY }} | |
steps: | |
- uses: actions/checkout@v3 | |
with: | |
fetch-depth: 0 | |
- name: Setup bun | |
uses: oven-sh/setup-bun@v1 | |
with: | |
bun-version: latest | |
- name: Setup Node.js | |
uses: actions/setup-node@v3 | |
with: | |
node-version: 20.9.0 | |
- name: Install Dependencies | |
run: bun i | |
- run: bun run type-check | |
- run: bun run lint | |
- run: bun test --timeout=25000 | |
approve: | |
if: github.ref != 'refs/heads/main' | |
runs-on: ubuntu-latest | |
steps: | |
- name: Approve | |
run: echo For security reasons, all pull requests need to be approved first before running any automated CI. | |
test-branch: | |
if: github.ref != 'refs/heads/main' | |
name: run-tests | |
runs-on: ubuntu-latest | |
needs: [approve] | |
environment: OPENAI | |
env: | |
OPENAI_API_KEY: ${{ secrets.OPENAI_API_KEY }} | |
ANYSCALE_API_KEY: ${{ secrets.ANYSCALE_API_KEY }} | |
TOGETHER_API_KEY: ${{ secrets.TOGETHER_API_KEY }} | |
steps: | |
- uses: actions/checkout@v3 | |
with: | |
ref: ${{ github.event.pull_request.head.sha }} | |
fetch-depth: 2 | |
- name: Setup bun | |
uses: oven-sh/setup-bun@v1 | |
with: | |
bun-version: latest | |
- name: Setup Node.js | |
uses: actions/setup-node@v3 | |
with: | |
node-version: 20.9.0 | |
- name: Install Dependencies | |
run: bun i | |
- run: bun run type-check | |
- run: bun run lint | |
- run: bun test --timeout=25000 | |