Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
329 changes: 255 additions & 74 deletions .github/workflows/js.yaml → .github/workflows/checks.yaml

Large diffs are not rendered by default.

43 changes: 0 additions & 43 deletions .github/workflows/e2e.yaml

This file was deleted.

89 changes: 52 additions & 37 deletions .github/workflows/integration-tests.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,46 +2,61 @@ name: integration-tests

on:
pull_request:
types: [opened, synchronize, reopened, labeled]
paths:
- "js/**"
- "e2e/**"
- ".github/workflows/integration-tests.yaml"
- "package.json"
- "pnpm-lock.yaml"
- "pnpm-workspace.yaml"
- "turbo.json"
- "Makefile"
push:
branches: [main]

jobs:
open-pr:
if: ${{ contains(github.event.pull_request.labels.*.name, 'run-integration-tests') }}
runs-on: ubuntu-latest
timeout-minutes: 10
permissions:
contents: write
pull-requests: write
permissions:
contents: read

jobs:
js-provider-tests:
runs-on: ${{ matrix.os }}
timeout-minutes: 30
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest, windows-latest]
node-version: [20, 22]
env:
ANTHROPIC_API_KEY: ${{ secrets.ANTHROPIC_API_KEY }}
OPENAI_API_KEY: ${{ secrets.OPENAI_API_KEY }}
GEMINI_API_KEY: ${{ secrets.GEMINI_API_KEY }}
steps:
- name: Checkout parent repository
uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 # v4.3.1
- uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 # v4.3.1
- uses: actions/setup-node@49933ea5288caeca8642d1e84afbd3f7d6820020 # v4.4.0
with:
repository: braintrustdata/braintrust
path: braintrust
token: ${{ secrets.CROSS_REPO_TOKEN }}
fetch-depth: 0

- name: Configure Git in parent repository
node-version: ${{ matrix.node-version }}
registry-url: "https://registry.npmjs.org"
- uses: pnpm/action-setup@b906affcce14559ad1aafd4ab0e942779e9f58b1 # v4.3.0
- name: Run provider-backed JS tests
shell: bash
run: |
cd braintrust
git config user.name "GitHub Actions Bot"
git config user.email "[email protected]"
make js-test-external

- name: Initialize and update SDK submodule
run: |
cd braintrust
git submodule init
git submodule update --init --recursive
cd sdk
git remote set-url origin https://github.com/braintrustdata/braintrust-sdk-javascript.git
git fetch origin
git checkout ${{ github.event.pull_request.head.sha }}

- name: Create integration test PR
run: ./braintrust/sdk/scripts/create-integration-test-pr.sh
env:
GH_TOKEN: ${{ secrets.CROSS_REPO_TOKEN }}
BRANCH_NAME: ${{ github.head_ref || github.ref_name }}
COMMIT_HASH: ${{ github.event.pull_request.head.sha }}
PARENT_REPO_PATH: braintrust
e2e:
runs-on: ubuntu-latest
timeout-minutes: 20
env:
BRAINTRUST_API_KEY: ${{ secrets.BRAINTRUST_API_KEY }}
ANTHROPIC_API_KEY: ${{ secrets.ANTHROPIC_API_KEY }}
GEMINI_API_KEY: ${{ secrets.GEMINI_API_KEY }}
OPENAI_API_KEY: ${{ secrets.OPENAI_API_KEY }}
steps:
- uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 # v4.3.1
- uses: actions/setup-node@49933ea5288caeca8642d1e84afbd3f7d6820020 # v4.4.0
with:
node-version-file: .tool-versions
- uses: pnpm/action-setup@b906affcce14559ad1aafd4ab0e942779e9f58b1 # v4.3.0
- name: Install dependencies
run: pnpm install --frozen-lockfile
- name: Run e2e tests
run: pnpm test:e2e
71 changes: 0 additions & 71 deletions .github/workflows/lint.yaml

This file was deleted.

2 changes: 1 addition & 1 deletion .github/workflows/npm-download-stats.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ jobs:

- uses: actions/setup-node@a0853c24544627f65ddf259abe73b1d18a591444 # v5.0.0
with:
node-version: "22"
node-version-file: .tool-versions

- name: Report download stats to Datadog
env:
Expand Down
40 changes: 0 additions & 40 deletions .github/workflows/otel-js-test.yaml

This file was deleted.

47 changes: 47 additions & 0 deletions .github/workflows/platform-tests.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
name: platform-tests

on:
pull_request:
types: [opened, synchronize, reopened, labeled]

jobs:
open-pr:
if: ${{ contains(github.event.pull_request.labels.*.name, 'run-integration-tests') }}
runs-on: ubuntu-latest
timeout-minutes: 10
permissions:
contents: write
pull-requests: write

steps:
- name: Checkout parent repository
uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 # v4.3.1
with:
repository: braintrustdata/braintrust
path: braintrust
token: ${{ secrets.CROSS_REPO_TOKEN }}
fetch-depth: 0

- name: Configure Git in parent repository
run: |
cd braintrust
git config user.name "GitHub Actions Bot"
git config user.email "[email protected]"

- name: Initialize and update SDK submodule
run: |
cd braintrust
git submodule init
git submodule update --init --recursive
cd sdk
git remote set-url origin https://github.com/braintrustdata/braintrust-sdk-javascript.git
git fetch origin
git checkout ${{ github.event.pull_request.head.sha }}

- name: Create integration test PR
run: ./braintrust/sdk/scripts/create-integration-test-pr.sh
env:
GH_TOKEN: ${{ secrets.CROSS_REPO_TOKEN }}
BRANCH_NAME: ${{ github.head_ref || github.ref_name }}
COMMIT_HASH: ${{ github.event.pull_request.head.sha }}
PARENT_REPO_PATH: braintrust
6 changes: 3 additions & 3 deletions .github/workflows/publish-js-sdk.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ jobs:
- name: Set up Node.js
uses: actions/setup-node@49933ea5288caeca8642d1e84afbd3f7d6820020 # v4.4.0
with:
node-version: "22"
node-version-file: .tool-versions
- name: Determine release metadata
id: release_metadata
working-directory: js
Expand Down Expand Up @@ -129,7 +129,7 @@ jobs:
- name: Set up Node.js
uses: actions/setup-node@49933ea5288caeca8642d1e84afbd3f7d6820020 # v4.4.0
with:
node-version: "22"
node-version-file: .tool-versions
registry-url: "https://registry.npmjs.org"
- name: Install npm 11.6.2
run: npm install -g [email protected]
Expand Down Expand Up @@ -200,7 +200,7 @@ jobs:
- name: Set up Node.js
uses: actions/setup-node@49933ea5288caeca8642d1e84afbd3f7d6820020 # v4.4.0
with:
node-version: "22"
node-version-file: .tool-versions
registry-url: "https://registry.npmjs.org"
- name: Install npm 11.6.2
run: npm install -g [email protected]
Expand Down
44 changes: 0 additions & 44 deletions .github/workflows/templates-nunjucks-build-test.yaml

This file was deleted.

Loading
Loading