Skip to content
This repository has been archived by the owner on Aug 30, 2024. It is now read-only.

Merge pull request #49 from SciPhi-AI/Nolan/RagAgent #41

Merge pull request #49 from SciPhi-AI/Nolan/RagAgent

Merge pull request #49 from SciPhi-AI/Nolan/RagAgent #41

name: Integration Tests
on:
push:
branches: [main]
pull_request:
branches: [main]
jobs:
test:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Set up Python
uses: actions/setup-python@v2
with:
python-version: "3.x"
- name: Install R2R
run: |
python -m pip install --upgrade pip
pip install r2r
- name: Start R2R server
env:
POSTGRES_HOST: ${{ secrets.POSTGRES_HOST }}
POSTGRES_USER: ${{ secrets.POSTGRES_USER }}
POSTGRES_PASSWORD: ${{ secrets.POSTGRES_PASSWORD }}
POSTGRES_PORT: ${{ secrets.POSTGRES_PORT }}
POSTGRES_DBNAME: ${{ secrets.POSTGRES_DBNAME }}
POSTGRES_VECS_COLLECTION: ${{ secrets.POSTGRES_VECS_COLLECTION }}
OPENAI_API_KEY: ${{ secrets.OPENAI_API_KEY }}
run: |
r2r serve --port=8000 > r2r_server.log 2>&1 &
sleep 15
- name: Use Node.js
uses: actions/setup-node@v2
with:
node-version: "20.x"
- name: Install dependencies
run: npm ci
- name: Check if R2R server is running
run: |
curl http://localhost:8000/health || echo "Server not responding"
- name: Display R2R server logs if server not responding
if: failure()
run: cat r2r_server.log
- name: Run integration tests
run: npm run test
- name: Display R2R server logs if tests fail
if: failure()
run: cat r2r_server.log