Add support for Ollama and Cohere and any other LangChain supported model #360
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: 'tests' | |
on: | |
pull_request: | |
paths: | |
- '**/*.py' | |
- '.github/workflows/unit.yml' | |
push: | |
paths: | |
- '**/*.py' | |
- '.github/workflows/unit.yml' | |
jobs: | |
unit: | |
name: 'Run unit tests' | |
runs-on: 'ubuntu-latest' | |
strategy: | |
matrix: | |
python-version: ["3.10", "3.11", "3.12.3"] | |
services: | |
pgdatabase: | |
image: pgvector/pgvector:0.7.4-pg16 | |
env: | |
POSTGRES_USER: postgres | |
POSTGRES_PASSWORD: postgres | |
POSTGRES_DB: brevia_unittest | |
volumes: | |
- pgdata:/var/lib/postgresql/data | |
ports: | |
- "5432:5432" | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Set up python | |
id: setup-python | |
uses: actions/setup-python@v4 | |
with: | |
python-version: ${{ matrix.python-version }} | |
- name: Install and configure Poetry | |
uses: snok/install-poetry@v1 | |
with: | |
version: latest | |
virtualenvs-create: true | |
virtualenvs-in-project: true | |
installer-parallel: true | |
- name: Load cached venv | |
id: cached-poetry-dependencies | |
uses: actions/cache@v3 | |
with: | |
path: .venv | |
key: venv-${{ runner.os }}-${{ steps.setup-python.outputs.python-version }}-${{ hashFiles('**/poetry.lock') }} | |
- name: Install dependencies, including dev dependencies | |
if: steps.cached-poetry-dependencies.outputs.cache-hit != 'true' | |
run: poetry install --no-interaction --with dev | |
- name: Install `psql` client, used by collections io commands | |
run: sudo apt-get install --yes --no-install-recommends postgresql-client | |
- name: Test env setup | |
run: cp .env.sample .env && cp tests/.env.sample tests/.env | |
- name: Run pytest | |
run: .venv/bin/pytest --cov-report xml --cov=brevia tests/ -v -s | |
- name: Coveralls | |
uses: coverallsapp/github-action@v2 | |
with: | |
parallel: true | |
flag-name: run-${{ steps.setup-python.outputs.python-version }} | |
finish: | |
needs: unit | |
runs-on: ubuntu-latest | |
steps: | |
- name: Close parallel build | |
uses: coverallsapp/github-action@v1 | |
with: | |
parallel-finished: true | |
carryforward: "run-3.10,run-3.11" |