3x-ui/.github
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
..
ISSUE_TEMPLATE fix(ci): resync the bot prompts with the repo and close the gaps an audit found 2026-08-17 02:41:21 +02:00
workflows ci: actually run the PostgreSQL schema and migration tests (#6224) 2026-08-18 11:38:14 +02:00
dependabot.yml Security hardening: sessions, SSRF, CSP nonce, CSRF logout, trusted proxies (#4275) 2026-05-13 12:52:52 +02:00
FUNDING.yml chore(github): overhaul issue and PR templates 2026-05-24 22:14:28 +02:00
pull_request_template.md chore(github): overhaul issue and PR templates 2026-05-24 22:14:28 +02:00