Skip to content

fix: boot problems

fix: boot problems #3

Workflow file for this run

name: Backend CI
on:
push:
branches: [main, develop]
paths:
- 'backend/**'
- '.github/workflows/ci-backend.yml'
pull_request:
branches: [main, develop]
paths:
- 'backend/**'
defaults:
run:
working-directory: backend
env:
PYTHON_VERSION: '3.11'
jobs:
lint:
name: Lint & Type Check
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Install uv
uses: astral-sh/setup-uv@v4
- name: Set up Python
run: uv python install ${{ env.PYTHON_VERSION }}
- name: Install dependencies
run: uv sync
- name: Run Ruff check
run: uv run ruff check .
- name: Run Ruff format check
run: uv run ruff format --check .
- name: Run Pyright
run: uv run pyright
test:
name: Tests
runs-on: ubuntu-latest
services:
postgres:
image: postgres:16-alpine
env:
POSTGRES_DB: glean_test
POSTGRES_USER: glean
POSTGRES_PASSWORD: testpassword
ports:
- 5432:5432
options: --health-cmd pg_isready --health-interval 10s --health-timeout 5s --health-retries 5
redis:
image: redis:7-alpine
ports:
- 6379:6379
steps:
- uses: actions/checkout@v4
- name: Install uv
uses: astral-sh/setup-uv@v4
- name: Set up Python
run: uv python install ${{ env.PYTHON_VERSION }}
- name: Install dependencies
run: uv sync
- name: Run tests
env:
DATABASE_URL: postgresql+asyncpg://glean:testpassword@localhost:5432/glean_test
REDIS_URL: redis://localhost:6379/0
run: uv run pytest --cov --cov-report=xml
- name: Upload coverage
uses: codecov/codecov-action@v4
with:
files: backend/coverage.xml
flags: backend