Skip to content

ci: add visual regression checks for Gitea 1.27 and 28 - #8

Merged
mechiland merged 2 commits into
mainfrom
codex/ci-visual-tests
Nov 2, 2026
Merged

mechiland merged 2 commits into
mainfrom
codex/ci-visual-tests

Conversation

@mechiland

@mechiland mechiland commented Nov 2, 2026 •

Copy link
Copy Markdown
Owner

CI previously linted, built and packaged the theme without checking the rendered UI. Add a visual regression matrix on Gitea 1.27.3 and 28.2.0, and require both jobs to pass before the build/package/release job runs.

Each job builds the approved v0.2.2 commit and the candidate, installs their complete packages into two disposable Gitea containers, and seeds identical data through the API. Playwright renders both in the same browser/OS and compares their screenshots; the approved source revision is pinned explicitly rather than following the PR base automatically. Intentional visual changes require an explicit baseline update.

Coverage:

  • Repository home, issue list/conversation, PR conversation, unified/split diffs, comment menus, reaction pickers and inline reply editor.
  • Light/dark themes and 1440px/390px viewports: 28 cases and 40 screenshot comparisons per Gitea version.
  • Every menu item must receive pointer events; mobile split diffs must restore horizontal scrolling after menu dismissal.
  • Failed comparisons fail CI and upload the HTML report, expected/actual/diff images, traces, JSON results and Gitea logs.

Validation:

  • Confirmed that the pre-fix v0.2.1 reference fails with a pixel diff for the clipped review menu from bug: PR评论的菜单显示不全 #6.
  • Local lint and strict builds passed.
  • No developer database, private credentials or pre-existing Gitea instance is required. Background queues, lazy chunks, timestamps, animations and pointer position are stabilized before capture.

GitHub Actions verification: run 41414717706 passed both visual jobs and the dependent build/package job on commit 533fe94. Downloaded and checked both CI artifacts: 56 passed cases, 80 reference/actual screenshot comparisons, no skipped/flaky cases, HTML reports and both Gitea logs. The earlier failed run also verified that build/package is blocked while visual jobs fail and reports still upload.

@mechiland
mechiland merged commit 3286d80 into main Nov 2, 2026
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant