Skip to content

deployment ready

deployment ready #4

Workflow file for this run

name: CI
on:
push:
branches:
- "**"
pull_request:
branches:
- main
jobs:
test:
runs-on: ubuntu-latest
services:
postgres:
image: postgres:16
env:
POSTGRES_DB: singularity
POSTGRES_USER: singularity
POSTGRES_PASSWORD: dev_password
ports:
- 5432:5432
options: >-
--health-cmd "pg_isready -U singularity -d singularity"
--health-interval 5s
--health-timeout 5s
--health-retries 10
redis:
image: redis:7
ports:
- 6379:6379
options: >-
--health-cmd "redis-cli ping"
--health-interval 5s
--health-timeout 5s
--health-retries 10
env:
DATABASE_URL: postgresql+asyncpg://singularity:dev_password@localhost:5432/singularity
REDIS_URL: redis://localhost:6379
JWT_SECRET: ci-test-secret-not-for-production
JWT_ALGORITHM: HS256
ACCESS_TOKEN_EXPIRE_MINUTES: 15
REFRESH_TOKEN_EXPIRE_DAYS: 30
ENVIRONMENT: test
QDRANT_FORCE_IN_MEMORY: "1"
BLOB_STORE: local
LOCAL_BLOB_DIR: /tmp/blob_storage
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Set up Python 3.12
uses: actions/setup-python@v5
with:
python-version: "3.12"
cache: pip
- name: Install dependencies
run: |
pip install --upgrade pip
pip install -r requirements.txt -r requirements_api.txt
- name: Run database migrations
run: alembic upgrade head
- name: Run tests
run: pytest tests/ -x --tb=short