Skip to content

ref(adk): migrate ADK wrapper to integrations API #225

ref(adk): migrate ADK wrapper to integrations API

ref(adk): migrate ADK wrapper to integrations API #225

name: integration-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: Generate GitHub App token
id: app-token
uses: actions/create-github-app-token@f8d387b68d61c58ab83c6c016672934102569859 # v3.0.0
with:
app-id: ${{ secrets.BRAINTRUST_BOT_APP_ID }}
private-key: ${{ secrets.BRAINTRUST_BOT_PRIVATE_KEY }}
owner: braintrustdata
repositories: |
braintrust
braintrust-sdk-python
permission-contents: write
permission-pull-requests: write
- name: Checkout parent repository
uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 # v4.3.1
with:
repository: braintrustdata/braintrust
path: braintrust
token: ${{ steps.app-token.outputs.token }}
fetch-depth: 0
- name: Configure Git in parent repository
run: |
cd braintrust
git config user.name "${{ steps.app-token.outputs.app-slug }}[bot]"
git config user.email "${{ steps.app-token.outputs.app-slug }}[bot]@users.noreply.github.com"
- name: Initialize and update SDK submodule
run: |
cd braintrust
git submodule init
git submodule update --init --recursive
cd sdk-python
git remote set-url origin https://github.com/braintrustdata/braintrust-sdk-python.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: ${{ steps.app-token.outputs.token }}
BRANCH_NAME: ${{ github.head_ref || github.ref_name }}
COMMIT_HASH: ${{ github.event.pull_request.head.sha }}
PARENT_REPO_PATH: braintrust