Islam Mamedov
Add CI retrieval evaluation gate and lock dependencies
a29c69c
Raw
History Blame Contribute Delete
1.21 kB
name: Tests and Retrieval Eval
on:
push:
branches:
- main
pull_request:
branches:
- main
permissions:
contents: read
concurrency:
group: ci-${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
jobs:
test-and-evaluate:
name: Pytest and Recall Gate
runs-on: ubuntu-latest
timeout-minutes: 30
env:
TOKENIZERS_PARALLELISM: "false"
PYTHONUNBUFFERED: "1"
steps:
- name: Check out repository
uses: actions/checkout@v7
- name: Set up Python
uses: actions/setup-python@v6
with:
python-version: "3.11"
cache: pip
cache-dependency-path: requirements-lock.txt
- name: Install locked dependencies
run: |
python -m pip install --upgrade pip
pip install -r requirements-lock.txt
- name: Run unit tests
run: |
pytest tests/ -v
- name: Build a fresh vector index
run: |
rm -rf data/chroma
python src/index.py
- name: Run retrieval evaluation gate
run: |
python src/eval.py \
--mode dense \
--k 5 \
--min-recall 0.90