name: ci on: push: branches: [main, develop, production] pull_request: jobs: test: runs-on: ubuntu-latest services: postgres: image: postgres:16-alpine env: POSTGRES_DB: drivers POSTGRES_USER: drivers POSTGRES_PASSWORD: drivers ports: - 5433:5432 options: >- --health-cmd "pg_isready -U drivers -d drivers" --health-interval 5s --health-timeout 3s --health-retries 10 steps: - uses: actions/checkout@v4 - uses: actions/setup-python@v5 with: python-version: "3.12" - name: Install dependencies run: | python -m pip install --upgrade pip pip install -e ".[dev]" - name: Lint run: ruff check . - name: Tests run: pytest -q - name: Migration smoke env: DATABASE_URL: postgresql+asyncpg://drivers:drivers@127.0.0.1:5433/drivers run: alembic upgrade head - name: Docker build run: docker build .