mirror of
https://github.com/QuivrHQ/quivr.git
synced 2025-01-07 08:07:44 +03:00
34e47a0af2
The `backend-core-tests.yml` GitHub Actions workflow file has been updated to include the `OPENAI_API_KEY` environment variable with a test key. This change allows the tests to access the OpenAI API using the specified key.
44 lines
829 B
YAML
44 lines
829 B
YAML
name: Run Tests with Tika Server
|
|
|
|
on:
|
|
push:
|
|
paths:
|
|
- 'backend/core/**'
|
|
pull_request:
|
|
paths:
|
|
- 'backend/core/**'
|
|
workflow_dispatch:
|
|
|
|
jobs:
|
|
test:
|
|
runs-on: ubuntu-latest
|
|
|
|
services:
|
|
tika:
|
|
image: apache/tika
|
|
ports:
|
|
- 9998:9998
|
|
|
|
steps:
|
|
- name: Checkout code
|
|
uses: actions/checkout@v2
|
|
|
|
- name: Set up Python
|
|
uses: actions/setup-python@v2
|
|
with:
|
|
python-version: '3.11'
|
|
|
|
- name: Install dependencies
|
|
run: |
|
|
cd backend/core
|
|
python -m pip install --upgrade pip
|
|
pip install poetry
|
|
poetry install -E base
|
|
|
|
- name: Run tests
|
|
env:
|
|
TIKA_URL: http://localhost:9998/tika
|
|
OPENAI_API_KEY: this-is-a-test-key
|
|
run: |
|
|
cd backend/core
|
|
poetry run pytest tests |