feat: support configurable connection-pool sizing #27
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: CI | |
| on: | |
| push: | |
| branches: [main, "claude/**"] | |
| pull_request: | |
| # Cancel superseded runs on the same ref. | |
| concurrency: | |
| group: ci-${{ github.ref }} | |
| cancel-in-progress: true | |
| jobs: | |
| lint: | |
| name: Lint & type-check | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Set up uv | |
| uses: astral-sh/setup-uv@v5 | |
| with: | |
| python-version: "3.12" | |
| enable-cache: true | |
| - run: uv sync --frozen | |
| - name: ruff (lint) | |
| run: uv run ruff check . | |
| - name: ruff (format) | |
| run: uv run ruff format --check . | |
| - name: mypy | |
| run: uv run mypy src/mcpg | |
| test: | |
| name: Tests (PG ${{ matrix.postgres }}) | |
| runs-on: ubuntu-latest | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| postgres: ["14", "15", "16", "17"] | |
| services: | |
| postgres: | |
| image: postgres:${{ matrix.postgres }} | |
| env: | |
| POSTGRES_USER: postgres | |
| POSTGRES_PASSWORD: postgres | |
| POSTGRES_DB: mcpg_test | |
| ports: | |
| - 5432:5432 | |
| options: >- | |
| --health-cmd pg_isready | |
| --health-interval 10s | |
| --health-timeout 5s | |
| --health-retries 10 | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Set up uv | |
| uses: astral-sh/setup-uv@v5 | |
| with: | |
| python-version: "3.12" | |
| enable-cache: true | |
| - run: uv sync --frozen | |
| # Runs unit, vendored-kernel, and integration suites with the coverage | |
| # gate (fail_under = 90, authored code only) against each PG version. | |
| - name: pytest | |
| env: | |
| MCPG_TEST_DATABASE_URL: postgresql://postgres:postgres@localhost:5432/mcpg_test | |
| run: uv run pytest -q --cov |