fix(api): ingest runner modified checker - minio #153
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: Test Rag Engine | |
on: | |
push: | |
paths: | |
- "nesis/rag/core/**" | |
- "nesis/rag/tests/**" | |
- "nesis/rag/requirements*" | |
- "nesis/rag/settings.yaml" | |
pull_request: | |
paths: | |
- "nesis/rag/core/**" | |
- "nesis/rag/tests/**" | |
- "nesis/rag/requirements*" | |
- "nesis/rag/settings.yaml" | |
jobs: | |
linter: | |
name: Black formatter | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: psf/black@stable | |
with: | |
options: "--check --verbose" | |
src: "./nesis/rag/" | |
version: "24.3.0" | |
test: | |
runs-on: ubuntu-latest | |
name: Test RAG API | |
env: | |
HF_TOKEN: ${{ secrets.HF_TOKEN }} | |
services: | |
postgres: | |
image: ametnes/postgresql:16-debian-12 | |
env: | |
POSTGRES_USER: postgres | |
POSTGRES_PASSWORD: password | |
POSTGRES_DB: nesis | |
ports: | |
- 5432:5432 | |
# Set health checks to wait until postgres has started | |
options: >- | |
--health-cmd "pg_isready -h localhost -U $$POSTGRES_USER" | |
--health-interval 10s | |
--health-timeout 5s | |
--health-retries 10 | |
memcached: | |
image: bitnami/memcached:1.6.19 | |
ports: | |
- 11211:11211 | |
steps: | |
- name: Check out source | |
uses: actions/checkout@v4 | |
with: | |
fetch-depth: 0 | |
- name: Set up Python | |
uses: actions/setup-python@v5 | |
with: | |
python-version: "3.11" | |
- name: Install dependencies | |
run: | | |
python -m pip install --upgrade pip | |
sudo apt update -y | |
sudo apt install ffmpeg tesseract-ocr poppler-utils -y | |
pip install -r nesis/rag/requirements.txt -r nesis/rag/requirements-test.txt -r nesis/rag/requirements-huggingface.txt | |
pip install -U transformers | |
pip install -U tokenizers | |
- name: Run unit tests | |
env: | |
NESIS_MEMCACHE_HOSTS: localhost:11211 | |
NESIS_RAG_PGVECTOR_URL: postgresql://postgres:password@localhost:5432/nesis | |
NESIS_RAG_EMBEDDING_MODE: local | |
OPENAI_API_KEY: sk_some_key | |
run: | | |
pytest nesis/rag/tests/ |