Skip to content

feat(graph): Fase 6a/6b — projeção em grafo das entidades (#180) #11

feat(graph): Fase 6a/6b — projeção em grafo das entidades (#180)

feat(graph): Fase 6a/6b — projeção em grafo das entidades (#180) #11

name: Migration Integration Tests
on:
pull_request:
paths:
- 'scripts/migrate.py'
- 'scripts/migrations/**'
- 'tests/integration/test_migrate_integration.py'
push:
branches: [main]
paths:
- 'scripts/migrate.py'
- 'scripts/migrations/**'
jobs:
test-migrations:
name: Test Migrations (PostgreSQL)
runs-on: ubuntu-latest
services:
postgres:
image: pgvector/pgvector:pg16
env:
POSTGRES_USER: test
POSTGRES_PASSWORD: test
POSTGRES_DB: test_migrations
ports:
- 5432:5432
options: >-
--health-cmd pg_isready
--health-interval 10s
--health-timeout 5s
--health-retries 5
steps:
- uses: actions/checkout@v4
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: '3.12'
- name: Install Poetry
run: |
curl -sSL https://install.python-poetry.org | python3 -
echo "$HOME/.local/bin" >> $GITHUB_PATH
- name: Cache Poetry dependencies
uses: actions/cache@v4
with:
path: ~/.cache/pypoetry
key: ${{ runner.os }}-poetry-${{ hashFiles('poetry.lock') }}
restore-keys: |
${{ runner.os }}-poetry-
- name: Install dependencies
run: poetry install --no-interaction
- name: Run migration integration tests
env:
MIGRATION_TEST_DATABASE_URL: postgresql://test:test@localhost:5432/test_migrations
run: poetry run pytest tests/integration/test_migrate_integration.py -v --tb=short