mirror of
https://github.com/QuivrHQ/quivr.git
synced 2024-12-15 01:21:48 +03:00
50 lines
1.3 KiB
YAML
50 lines
1.3 KiB
YAML
name: Backend Tests
|
|
|
|
on:
|
|
push:
|
|
branches: [ main ]
|
|
paths:
|
|
- 'backend/**'
|
|
pull_request:
|
|
branches: [ main ]
|
|
paths:
|
|
- 'backend/**'
|
|
jobs:
|
|
build:
|
|
runs-on: ubuntu-latest
|
|
defaults:
|
|
run:
|
|
working-directory: ./backend
|
|
environment: preview
|
|
strategy:
|
|
matrix:
|
|
python-version: [ "3.11"]
|
|
|
|
steps:
|
|
- uses: actions/checkout@v3
|
|
- name: Set up Python ${{ matrix.python-version }}
|
|
uses: actions/setup-python@v4
|
|
with:
|
|
python-version: ${{ matrix.python-version }}
|
|
cache: 'pip'
|
|
- name: Install dependencies
|
|
run: |
|
|
python -m pip install --upgrade pip
|
|
pip install pytest
|
|
pip install pyright
|
|
if [ -f requirements.txt ]; then pip install -r requirements.txt; fi
|
|
- name: Test with pytest
|
|
env:
|
|
SUPABASE_URL: ${{secrets.SUPABASE_URL}}
|
|
SUPABASE_SERVICE_KEY: ${{secrets.SUPABASE_SERVICE_KEY}}
|
|
OPENAI_API_KEY: ${{secrets.OPENAI_API_KEY}}
|
|
ANTHROPIC_API_KEY: ${{secrets.ANTHROPIC_API_KEY}}
|
|
JWT_SECRET_KEY: ${{secrets.JWT_SECRET_KEY}}
|
|
CI_TEST_API_KEY: ${{secrets.CI_TEST_API_KEY}}
|
|
run: |
|
|
pytest
|
|
|
|
- name: Static type checking with pyright
|
|
run: |
|
|
pyright
|