name: Run Tests on: push: branches: [ main ] pull_request: branches: [ main ] jobs: test: runs-on: ubuntu-latest services: postgres: image: pgvector/pgvector:pg16 env: POSTGRES_USER: postgres POSTGRES_PASSWORD: postgres POSTGRES_DB: memora_test options: >- --health-cmd pg_isready --health-interval 10s --health-timeout 5s --health-retries 5 ports: - 5432:5432 env: MEMORA_API_DATABASE_URL: postgresql://postgres:postgres@localhost:5432/memora_test MEMORA_API_LLM_PROVIDER: groq MEMORA_API_LLM_API_KEY: ${{ secrets.GROQ_API_KEY }} MEMORA_API_LLM_MODEL: openai/gpt-oss-20b steps: - uses: actions/checkout@v4 - name: Install uv uses: astral-sh/setup-uv@v5 with: enable-cache: true - name: Set up Python uses: actions/setup-python@v5 with: python-version-file: ".python-version" - name: Install dependencies run: uv sync --extra test - name: Run migrations working-directory: ./memora run: | uv run alembic upgrade head - name: Run tests run: uv run pytest memora/tests -v