New `ci / db` job with a pgvector service: Go applies all migrations, rolls them back to zero and applies them again, then runs the scanner, fingerprint, write-template, top-tracks and upload-queue store queries; Python runs the analysis worker, catalog / profile loading and a full ALS training run against the same schema. Until now this SQL ran nowhere before reaching a real server. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
53 lines
1.8 KiB
YAML
53 lines
1.8 KiB
YAML
# Интеграционные проверки SQL на настоящем PostgreSQL + pgvector: миграции вверх / вниз / вверх,
|
|
# запросы сканера, отпечатков, шаблонов и очереди (Go), загрузка каталога, профиля и обучение ALS (Python).
|
|
name: ci / db
|
|
|
|
on:
|
|
push:
|
|
branches: [main]
|
|
paths:
|
|
- 'services/api/**'
|
|
- 'services/recommender/**'
|
|
- '.gitea/workflows/ci-db.yml'
|
|
pull_request:
|
|
paths:
|
|
- 'services/api/**'
|
|
- 'services/recommender/**'
|
|
- '.gitea/workflows/ci-db.yml'
|
|
|
|
concurrency:
|
|
group: ${{ github.workflow }}-${{ github.ref }}
|
|
cancel-in-progress: true
|
|
|
|
jobs:
|
|
db:
|
|
runs-on: ubuntu-latest
|
|
services:
|
|
postgres:
|
|
image: pgvector/pgvector:0.8.7-pg17
|
|
env:
|
|
POSTGRES_USER: pipu
|
|
POSTGRES_PASSWORD: pipu
|
|
POSTGRES_DB: pipu
|
|
options: >-
|
|
--health-cmd "pg_isready -U pipu"
|
|
--health-interval 5s
|
|
--health-timeout 5s
|
|
--health-retries 20
|
|
env:
|
|
TEST_DATABASE_URL: postgres://pipu:pipu@postgres:5432/pipu?sslmode=disable
|
|
steps:
|
|
- uses: actions/checkout@v4
|
|
- uses: actions/setup-go@v5
|
|
with: { go-version: "1.24", cache-dependency-path: services/api/go.sum }
|
|
- name: Go — миграции и запросы store
|
|
working-directory: services/api
|
|
run: go test -tags integration -count=1 -v ./internal/dbtest/
|
|
- uses: astral-sh/setup-uv@v6
|
|
with: { version: "0.10.2", enable-cache: true, cache-dependency-glob: services/recommender/uv.lock }
|
|
- name: Python — каталог, профиль, обучение ALS
|
|
working-directory: services/recommender
|
|
run: |
|
|
uv sync --frozen
|
|
uv run pytest -q tests/test_db_integration.py
|