mirror of
https://github.com/MHSanaei/3x-ui.git
synced 2026-12-03 21:18:19 +07:00
[PR #6224] [MERGED] ci: actually run the PostgreSQL schema and migration tests #6187
Labels
No labels
backlog
bug
clarification needed
documentation
duplicate
enhancement
github_actions
good first issue
invalid
javascript
New Feature
PR welcomed
pull-request
question
wontfix
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
MHSanaei/3x-ui#6187
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
📋 Pull Request Information
Original PR: https://github.com/MHSanaei/3x-ui/pull/6224
Author: @n0ctal
Created: 8/16/2026
Status: ✅ Merged
Merged: 8/18/2026
Merged by: @MHSanaei
Base:
main← Head:upstream-run-postgres-schema-tests📝 Commits (2)
ac36e60ci: actually run the PostgreSQL schema and migration tests5d82d63ci: make the PostgreSQL guard fail on a renamed test, and self-test the workflow📊 Changes
2 files changed (+23 additions, -3 deletions)
View changed files
📝
.github/workflows/ci.yml(+23 -3)➕
internal/web/dist/.gitkeep(+0 -0)📄 Description
Summary
TestHostAutoMigrateCreatesColumns_PostgresandTestMigrate_Postgresguard the PostgreSQL schema and the migration path, and botht.SkipunlessXUI_DB_TYPE/XUI_DB_DSNare set. CI sets those only for the durable-first step, so neither test has ever executed — a green pipeline currently says nothing about either path.Why
The tests exist and are maintained, so the intent is clearly that they run. Right now a PostgreSQL schema regression reaches a release with CI fully green, and the skip is invisible:
go testreportsokfor the package either way.The
postgres-durable-firstjob already provisions a PostgreSQL 16 service, so no new infrastructure is needed — the DSN just has to reach these two tests as well.Scope
One step added to the existing job, mirroring the pattern already used one step above: run the two tests against the running service and fail if either reports
--- SKIP.The skip guard matters as much as the run: without it, a future rename of a test or of an environment variable would silently return the job to testing nothing, which is the failure mode this PR is fixing.
Validation
Locally, against a PostgreSQL 16 instance:
Risk
Low. No production code changes, no new services, and the added step can only fail if these tests genuinely fail or silently stop running.
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.