Merge remote-tracking branch 'origin/dev-minor' into evals #1090
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: R2R JS SDK Integration Tests | |
on: | |
push: | |
branches: | |
- '**' # Trigger on all branches | |
jobs: | |
test: | |
runs-on: ubuntu-latest | |
env: | |
OPENAI_API_KEY: ${{ secrets.OPENAI_API_KEY }} | |
AZURE_API_KEY: ${{ secrets.AZURE_API_KEY }} | |
AZURE_API_BASE: ${{ secrets.AZURE_API_BASE }} | |
AZURE_API_VERSION: ${{ secrets.AZURE_API_VERSION }} | |
TELEMETRY_ENABLED: 'false' | |
R2R_POSTGRES_HOST: localhost | |
R2R_POSTGRES_DBNAME: postgres | |
R2R_POSTGRES_PORT: '5432' | |
R2R_POSTGRES_PASSWORD: postgres | |
R2R_POSTGRES_USER: postgres | |
R2R_PROJECT_NAME: r2r_default | |
steps: | |
- uses: actions/checkout@v2 | |
- name: Set up Python and install dependencies | |
uses: ./.github/actions/setup-python-light | |
with: | |
os: ubuntu-latest | |
- name: Setup and start PostgreSQL | |
uses: ./.github/actions/setup-postgres-ext | |
with: | |
os: ubuntu-latest | |
- name: Start R2R Light server | |
uses: ./.github/actions/start-r2r-light | |
- name: Use Node.js | |
uses: actions/setup-node@v2 | |
with: | |
node-version: "20.x" | |
- name: Install JS SDK dependencies | |
working-directory: ./js/sdk | |
run: npm ci | |
- name: Check if R2R server is running | |
run: | | |
curl http://localhost:7272/v2/health || echo "Server not responding" | |
- name: Run integration tests | |
working-directory: ./js/sdk | |
run: npm run test |