- newApp (extracted from main) is the exact production wiring; the `ci / db` job now also runs it on PostgreSQL, Redis and Meilisearch and walks the main user flows over HTTP: first admin sign-in and credential change, local source and scan, search, album / artist / top tracks, signed stream, events and history, likes, fallback wave, playback state, upload queue up to review. - ALS on a small library produced fewer than 64 factors and the insert into vector(64) failed; vectors are now zero-padded to the column size. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
67 lines
2.5 KiB
YAML
67 lines
2.5 KiB
YAML
# Интеграционные проверки SQL на настоящем PostgreSQL + pgvector: миграции вверх / вниз / вверх,
|
|
# запросы сканера, отпечатков, шаблонов и очереди, сквозной сценарий пользователя через HTTP (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
|
|
redis:
|
|
image: redis:7.4-alpine
|
|
meilisearch:
|
|
image: getmeili/meilisearch:v1.11
|
|
env:
|
|
MEILI_MASTER_KEY: ci-master-key-0123456789
|
|
MEILI_ENV: development
|
|
env:
|
|
TEST_DATABASE_URL: postgres://pipu:pipu@postgres:5432/pipu?sslmode=disable
|
|
TEST_REDIS_URL: redis://redis:6379/0
|
|
TEST_MEILI_URL: http://meilisearch:7700
|
|
TEST_MEILI_KEY: ci-master-key-0123456789
|
|
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/
|
|
- name: Go — сквозной сценарий пользователя (newApp на Postgres, Redis, Meilisearch)
|
|
working-directory: services/api
|
|
run: go test -tags integration -count=1 -v -run TestUserJourney ./cmd/api/
|
|
- 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
|