Skip to content

Scope resolvers (#37) #65

Scope resolvers (#37)

Scope resolvers (#37) #65

Workflow file for this run

name: Backend Tests
on:
push:
branches: [main, develop]
paths:
- 'backend/**'
- '.github/workflows/backend-tests.yml'
pull_request:
branches: [main, develop]
paths:
- 'backend/**'
- '.github/workflows/backend-tests.yml'
jobs:
test:
runs-on: ubuntu-latest
services:
postgres:
image: postgres:15
env:
POSTGRES_PASSWORD: postgres
POSTGRES_DB: postgres
options: >-
--health-cmd pg_isready
--health-interval 10s
--health-timeout 5s
--health-retries 5
ports:
- 5432:5432
redis:
image: redis:8
options: >-
--health-cmd "redis-cli ping"
--health-interval 10s
--health-timeout 5s
--health-retries 5
ports:
- 6379:6379
steps:
- uses: actions/checkout@v4
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: '3.13'
- name: Install dependencies
working-directory: backend
run: |
python -m pip install --upgrade pip
pip install -r requirements.txt
- name: Run unit tests
working-directory: backend
run: |
pytest tests/unit -v --cov=api --cov-report=xml
env:
DATABASE_URL: postgresql+asyncpg://postgres:postgres@localhost:5432/postgres
REDIS_URL: redis://localhost:6379
- name: Run integration tests
working-directory: backend
run: |
pytest tests/integration -v
env:
DATABASE_URL: postgresql+asyncpg://postgres:postgres@localhost:5432/postgres
REDIS_URL: redis://localhost:6379