Files
3x-ui/internal/web/dist/.gitkeep
n0ctal 2b1fe1fd02 ci: actually run the PostgreSQL schema and migration tests (#6224)
* ci: actually run the PostgreSQL schema and migration tests

TestHostAutoMigrateCreatesColumns_Postgres and TestMigrate_Postgres skip
unless XUI_DB_TYPE and XUI_DB_DSN are set. CI sets them only for the
durable-first step, so both tests have never run: a green pipeline says
nothing about the PostgreSQL schema or the migration path.

The job already has a PostgreSQL service. Point those two tests at it and
fail if either skips, the same guard the durable-first step uses.

* ci: make the PostgreSQL guard fail on a renamed test, and self-test the workflow

The guard asserted the absence of `--- SKIP`, which only catches a test that
ran and skipped. A renamed or deleted test makes `-run` match nothing, so
`go test` prints "no tests to run" and exits 0 — the step stays green while
testing nothing, which is the exact failure this PR set out to close.

Both steps now count `--- PASS` lines and require the expected number: at
least one for durable-first, exactly two for the schema tests.

Also adds `.github/workflows/ci.yml` to both `paths` filters so a change to
the workflow runs the workflow — without it this PR's own CI never fired and
the new step would first execute on main after merge — and hoists the
duplicated DSN to job-level `env`.

---------

Co-authored-by: n0ctal <n0ctal@users.noreply.github.com>
2026-08-18 11:38:14 +02:00

0 lines
0 B
Plaintext