From 4e890ff69baf98f7057381ed31dedd039cfbca73 Mon Sep 17 00:00:00 2001 From: Peli de Halleux Date: Sat, 21 Dec 2024 06:06:03 +0000 Subject: [PATCH] use provider in test scripts --- .github/workflows/anthropic.yml | 6 +---- .github/workflows/google.yml | 2 +- .github/workflows/huggingface.yml | 37 +++++++++++++++++++++++++++++++ .github/workflows/openai.yml | 22 +++--------------- 4 files changed, 42 insertions(+), 25 deletions(-) create mode 100644 .github/workflows/huggingface.yml diff --git a/.github/workflows/anthropic.yml b/.github/workflows/anthropic.yml index ccd972dfa7..5ec1442d0f 100644 --- a/.github/workflows/anthropic.yml +++ b/.github/workflows/anthropic.yml @@ -32,10 +32,6 @@ jobs: - name: compile run: yarn compile - name: poem - run: yarn run:script poem --model anthropic:claude-3-5-sonnet-20240620 --out-trace $GITHUB_STEP_SUMMARY - env: - ANTHROPIC_API_KEY: ${{ secrets.ANTHROPIC_API_KEY }} - - name: cache - run: yarn run:script summarize-cached --model anthropic:claude-3-5-sonnet-20240620 --small-model anthropic:claude-3-5-sonnet-20240620 + run: yarn run:script poem -p anthropic --out-trace $GITHUB_STEP_SUMMARY env: ANTHROPIC_API_KEY: ${{ secrets.ANTHROPIC_API_KEY }} diff --git a/.github/workflows/google.yml b/.github/workflows/google.yml index 6f61fd4a7a..a3bdd845d2 100644 --- a/.github/workflows/google.yml +++ b/.github/workflows/google.yml @@ -32,6 +32,6 @@ jobs: - name: compile run: yarn compile - name: poem - run: yarn run:script poem --model google:gemini-1.5-flash --out-trace $GITHUB_STEP_SUMMARY + run: yarn run:script poem -p google --out-trace $GITHUB_STEP_SUMMARY env: GOOGLE_API_KEY: ${{ secrets.GOOGLE_API_KEY }} diff --git a/.github/workflows/huggingface.yml b/.github/workflows/huggingface.yml new file mode 100644 index 0000000000..417549c7b4 --- /dev/null +++ b/.github/workflows/huggingface.yml @@ -0,0 +1,37 @@ +name: anthropic tests +on: + workflow_dispatch: + release: + types: + - published + pull_request: + paths: + - yarn.lock + - ".github/workflows/huggingface.yml" + - "packages/core/**/*" + - "packages/cli/**/*" + - "packages/samples/**/*" +concurrency: + group: ${{ github.workflow }}-${{ github.ref }}-huggingface + cancel-in-progress: true +jobs: + tests: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + with: + submodules: "recursive" + fetch-depth: 0 + - uses: actions/setup-node@v4 + with: + node-version: "20" + cache: yarn + - run: yarn install --frozen-lockfile + - name: typecheck + run: yarn typecheck + - name: compile + run: yarn compile + - name: poem + run: yarn run:script poem -p huggingface --out-trace $GITHUB_STEP_SUMMARY + env: + HUGGINGFACE_API_KEY: ${{ secrets.ANTHROPIC_API_KEY }} diff --git a/.github/workflows/openai.yml b/.github/workflows/openai.yml index 92b58af063..3e55fe42f1 100644 --- a/.github/workflows/openai.yml +++ b/.github/workflows/openai.yml @@ -1,24 +1,8 @@ name: openai smoke tests on: workflow_dispatch: - # pull_request: - # paths: - # - yarn.lock - # - ".github/workflows/github-models.yml" - # - "packages/core/**/*" - # - "packages/cli/**/*" - # - "packages/samples/**/*" - # push: - # branches: - # - main - # paths: - # - yarn.lock - # - ".github/workflows/github-models.yml" - # - "packages/core/**/*" - # - "packages/cli/**/*" - # - "packages/samples/**/*" concurrency: - group: ${{ github.workflow }}-${{ github.ref }}-github-models + group: ${{ github.workflow }}-${{ github.ref }}-openai cancel-in-progress: true jobs: tests: @@ -37,8 +21,8 @@ jobs: run: yarn typecheck - name: compile run: yarn compile - - name: run summarize openai:gpt-3.5-turbo - run: yarn test:summarize --model openai:gpt-3.5-turbo --out ./temp + - name: run summarize + run: yarn test:summarize -p openai --out-trace $GITHUB_STEP_SUMMARY env: OPENAI_API_KEY: ${{ secrets.OPENAI_API_KEY }} OPENAI_API_TYPE: ${{ secrets.OPENAI_API_TYPE }}