Files
poimen-memory/.gitea/workflows
rock f2cc704758
CI / CI (pull_request) Canceled after 0s
Database Migrations / Test Migrations (pull_request) Failing after 9s
Database Migrations / Apply Migrations to Production (pull_request) Skipped
Database Migrations / Gate PR on Migrations (pull_request) Skipped
ci: add automated migration testing workflow
Triggers on:
  ✓ Push to main or feat/* branches with changes to migrations/
  ✓ Pull requests that modify migrations/
  ✓ Manual workflow_dispatch trigger

Workflow:
  1. test-migrations job:
     - Runs on every PR + push (changes or manual)
     - Detects changed migration files
     - Tests all migrations on clean test database
     - Verifies schema (table counts, agent tables, indices)
     - Required to pass before merge

  2. apply-migrations job:
     - Runs only on push to main (after test-migrations passes)
     - Applies changed migrations to production database
     - Verifies production schema after apply
     - Only if tests passed

  3. gate-on-migrations job:
     - Blocks PR merge if migration tests fail
     - Prevents bad migrations from being committed

Prevents:
  ✗ Invalid SQL from being merged
  ✗ Schema breaking changes without review
  ✗ Migrations applied to production without test pass

Migration paths updated:
  - Old: crates/mem-store/migrations/
  - New: migrations/ (root level, matches our structure)
2026-09-15 00:31:40 +09:00
..