Skip to content

Create the minimal Discord bot with /ask functionality (#9) #10

Create the minimal Discord bot with /ask functionality (#9)

Create the minimal Discord bot with /ask functionality (#9) #10

Workflow file for this run

name: CI
on:
push:
branches: [main]
pull_request:
jobs:
lint:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: astral-sh/setup-uv@v5
with:
enable-cache: true
python-version: "3.12"
- run: uvx pre-commit run --all-files
test:
runs-on: ubuntu-latest
services:
postgres:
image: pgvector/pgvector:pg17
env:
POSTGRES_USER: postgres
POSTGRES_PASSWORD: postgres
POSTGRES_DB: cs_assistant_test
ports:
- 5432:5432
options: >-
--health-cmd "pg_isready -U postgres"
--health-interval 10s
--health-timeout 5s
--health-retries 5
env:
# TEST_DATABASE_URL must contain "test" and differ from DATABASE_URL (conftest safety guard).
# DATABASE_URL is required by Settings but never connected to during tests.
TEST_DATABASE_URL: postgresql+asyncpg://postgres:postgres@localhost:5432/cs_assistant_test
DATABASE_URL: postgresql+asyncpg://postgres:postgres@localhost:5432/cs_assistant
# Remaining vars are required by Settings; tests don't connect to these services.
REDIS_URL: redis://localhost:6379/0
OLLAMA_URL: http://localhost:11434
OLLAMA_CHAT_MODEL: llama3.2:3b
OLLAMA_EMBEDDING_MODEL: nomic-embed-text
EMBEDDING_DIM: "768"
TOP_K: "3"
steps:
- uses: actions/checkout@v4
- uses: astral-sh/setup-uv@v5
with:
enable-cache: true
python-version: "3.12"
- run: uv sync --frozen
- run: uv run pytest