DBA-702 MCP: Database health checks #28
Workflow file for this run
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: Postgres MCP CI | |
on: | |
push: | |
branches: | |
- main | |
paths-ignore: | |
- "**/README.md" | |
pull_request: | |
types: [opened, synchronize, reopened] | |
paths-ignore: | |
- "**/README.md" | |
jobs: | |
postgres-mcp-ci: | |
runs-on: ubuntu-latest | |
services: | |
postgres15: | |
image: postgres:15 | |
env: | |
POSTGRES_PASSWORD: postgres | |
POSTGRES_DB: test_db | |
ports: | |
- 5433:5432 | |
options: >- | |
--health-cmd pg_isready | |
--health-interval 10s | |
--health-timeout 5s | |
--health-retries 5 | |
postgres16: | |
image: postgres:16 | |
env: | |
POSTGRES_PASSWORD: postgres | |
POSTGRES_DB: test_db | |
ports: | |
- 5432:5432 | |
options: >- | |
--health-cmd pg_isready | |
--health-interval 10s | |
--health-timeout 5s | |
--health-retries 5 | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v4 | |
- name: Set up Python | |
uses: actions/setup-python@v5 | |
with: | |
python-version: "3.12" | |
- name: Start Docker service | |
run: sudo service docker start || true | |
- name: Verify Docker is running | |
run: docker info | |
- name: Install uv | |
uses: astral-sh/setup-uv@v5 | |
with: | |
version: "0.6.9" | |
- name: Build | |
run: uv sync | |
- name: Run Lint | |
run: | | |
uv run ruff format --check . | |
uv run ruff check . | |
- name: Run Check | |
run: uv run pyright | |
- name: Run Tests | |
env: | |
TEST2_DATABASE_URL: "postgresql://postgres:postgres@127.0.0.1:5432/test_db" | |
PG15_DATABASE_URL: "postgresql://postgres:postgres@127.0.0.1:5433/test_db" | |
PG16_DATABASE_URL: "postgresql://postgres:postgres@127.0.0.1:5432/test_db" | |
run: uv run pytest -v --log-cli-level=INFO |