Workflow file for this run
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 CLI Integration and Regression Test | |
on: | |
push: | |
branches: ['**'] | |
workflow_dispatch: | |
jobs: | |
build-and-test: | |
runs-on: ubuntu-latest | |
permissions: | |
contents: read | |
id-token: write | |
actions: write | |
env: | |
OPENAI_API_KEY: ${{ secrets.OPENAI_API_KEY }} | |
TELEMETRY_ENABLED: false | |
POSTGRES_USER: ${{ secrets.POSTGRES_USER }} | |
POSTGRES_PASSWORD: ${{ secrets.POSTGRES_PASSWORD }} | |
POSTGRES_DBNAME: ${{ secrets.POSTGRES_DBNAME }} | |
POSTGRES_HOST: ${{ secrets.POSTGRES_HOST }} | |
POSTGRES_PORT: ${{ secrets.POSTGRES_PORT }} | |
R2R_PROJECT_NAME: ${{ secrets.R2R_PROJECT_NAME }} | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: actions/setup-python@v4 | |
with: | |
python-version: '3.x' | |
- name: Install Poetry and dependencies | |
run: | | |
curl -sSL https://install.python-poetry.org | python3 - | |
cd py && poetry install -E core -E ingestion-bundle | |
- name: Start R2R server | |
working-directory: ./py | |
run: | | |
poetry run r2r serve & | |
echo "Waiting for services to start..." | |
sleep 30 | |
- name: Run integration tests | |
working-directory: ./py | |
run: | | |
python tests/integration/r2r_integration_tests.py test_ingest_sample_files_cli | |
python tests/integration/r2r_integration_tests.py test_document_ingestion_cli | |
- name: Stop R2R server | |
if: always() | |
run: pkill -f "r2r serve" |