ci: screenshot diff, installer test and every PostgreSQL authentication method
- Screenshots: a capture that exits with an error or writes nothing fails the job (the pictures it wrote are still published); the new "Screenshot diff" step compares them with tests/visual/baselines, fails beyond the tolerance, warns once for screens without a baseline and uploads the diff images. - installer (windows-latest): publishes App, Uploader and Setup (self-contained single file, no ReadyToRun), packs Titano 1.0.0 (with an extra legacy.txt), Titano 1.0.1 and the Uploader installer, and runs .github/scripts/installer-test.ps1: argument and not-installed exit codes, silent install into a folder with a space, Add/Remove Programs, shortcuts and the .titano file type, the installed programs drawing their screens, upgrade in place removing legacy.txt, uninstall removing itself, user data kept, the Uploader installer; the setup logs are printed whatever happens. The script now resolves its paths from the PowerShell location. - PostgreSQL 16/17: postgres-ci-setup.sh prepares the service container and the job exports the MD5, cleartext, trust, TLS and root-certificate variables. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_012iLMBNwBE2GnphAsu4cjaC
This commit is contained in:
4 files changed
+233
-9
No files matched your search
+16
-6
@@ -16,7 +16,7 @@ Companion to `docs/BRIEF.md` (scope, behaviour) and `docs/ui/DESIGN.md` (looks).
|
||||
| `src/Titano.App` | WPF exe `Titano.exe` | Desktop client |
|
||||
| `src/Titano.Uploader` | WPF exe | Uploader (tray, watch folders, resumable queue) |
|
||||
| `src/Titano.Setup` | WPF exe | In-house installer/uninstaller (TPK1 payload) |
|
||||
| `src/Titano.Tools` | net10.0 exe | CLI: `make-icon`, `i18n` (check, export, missing, import), `xaml-lint`, `package-guard`, `changelog`, `pack-installer`, `selftest`, `diagnose`, `fixtures` |
|
||||
| `src/Titano.Tools` | net10.0 exe | CLI: `make-icon`, `i18n` (check, export, missing, import), `xaml-lint`, `package-guard`, `changelog`, `pack-installer`, `selftest`, `diagnose`, `fixtures`, `screenshots` (diff, accept) |
|
||||
| `tests/Titano.Testing` | net10.0 | In-house test framework (`[Test]`, `[Theory]`+`[Case]`, `[Category]`, `[RequiresEnvironment]`, `[WindowsOnly]`, `[Serial]`, `Assert`, `TestContext`, JUnit) |
|
||||
| `tests/Titano.*.Tests` | exe | One test program per area; `dotnet run --project tests/X -- --junit out.xml` |
|
||||
|
||||
@@ -72,15 +72,15 @@ Dependencies point one way: `Core` ← `Core.Windows`, `Data`, `Protocol` ← `S
|
||||
| `Archive` | `CurrentArchive`, `ArchiveTree`, figures for the charts, maintenance reports, mass rename and move, delete and trash dialogs (`SequenceDeletion`, `DeletePlans`), `ArchiveFailures` |
|
||||
| `Server` | `ServerSession`, `ConnectFlow` (trust on first use), `SyncHost` (sync engine, agent, metered hold, editor connections, Export Sync), sync table, `RemoteSequenceApi` |
|
||||
| `Jobs`, `Settings`, `About` | Job list and buffering; settings rows, encoder inventory, language catalog, naming preview; update check and download |
|
||||
| `Infrastructure` | `AppServices` (composition root), `AppSettings`, `AppEnvironment` (installed or portable), `UiLanguage`, `LiveRegion`, `RenderNodeHost`, `DiagnosticsBundle`, `ShellActions` (BRIEF §8.6), device monitor |
|
||||
| `DesignTime` | `SampleData`: the archive, jobs and server the screenshots and smoke tests run on |
|
||||
| `Infrastructure` | `AppServices` (composition root), `AppSettings`, `AppEnvironment` (installed or portable), `AppClock` (today's date, frozen by `--capture`), `UiLanguage`, `LiveRegion`, `RenderNodeHost`, `DiagnosticsBundle`, `ShellActions` (BRIEF §8.6), device monitor |
|
||||
| `DesignTime` | `SampleData`: the archive, jobs and server the screenshots and smoke tests run on, dated from the fixed `SampleData.Now` |
|
||||
|
||||
### 2.4 Titano.Ui and Titano.Server
|
||||
|
||||
| Folder | Content |
|
||||
|---|---|
|
||||
| `Ui/Themes`, `Ui/Theming` | DESIGN tokens (light, dark), typography, control styles, `ThemeManager` |
|
||||
| `Ui/Controls` | `TitanoWindow` (chrome, language direction), `NavRail`, `JobBar`, `ToastHost`, `Field` (placeholder, icon, error), `Chip`, `AutoSlider`, `StatusGlyph`, `EmptyState`, `Icon`, `Bidi` (right-to-left rules) |
|
||||
| `Ui/Controls` | `TitanoWindow` (chrome, language direction), `NavRail`, `JobBar`, `ToastHost`, `Field` (placeholder, icon, error), `Chip`, `AutoSlider`, `StatusGlyph`, `EmptyState`, `Icon`, `Bidi` (right-to-left rules), `Motion` (animations off for screenshots) |
|
||||
| `Ui/Visuals` | `DrawingElement` (hover readout, item keyboard and activation) and its charts (`BarChart`, `SeriesChart`, `StackedBar`, `HeatmapStrip`, `TimelineBands`), `Filmstrip`, `PreviewViewport`, `CurveEditor`, `SequenceCard`, `VirtualizingWrapPanel`, `SegmentedControl`, `SplitButton` |
|
||||
| `Server/Api`, `Server/Events` | Endpoint groups (`XxxEndpoints.Map`), API errors, the WebSocket `EventHub` |
|
||||
| `Server/Security` | Accounts, password hashing, tokens, session cookies, login guard, access rules, audit log |
|
||||
@@ -224,6 +224,9 @@ run as server jobs whose progress comes from the events.
|
||||
- Framework: `Titano.Testing`. Test classes are `public sealed`; constructor may take `TestContext` (temp
|
||||
directories, cancellation, log). `[WindowsOnly]` for OS-specific tests, `[RequiresEnvironment("TITANO_TEST_PG")]`
|
||||
for PostgreSQL integration tests.
|
||||
- Classes run in parallel. A test that changes or observes process-wide state (the UI language, unobserved task
|
||||
exceptions, the managed heap) belongs in a `[Serial]` class; the App and Core test programs fail a test outside one
|
||||
that switches the language away from English (`TestContext.Current`).
|
||||
- Put tests under `tests/Titano.<Area>.Tests/<Folder>/<Thing>Tests.cs`, mirroring the source folder.
|
||||
- `Titano.App.Tests` targets net10.0-windows and runs on Windows CI only: keep logic in plain classes.
|
||||
- Fixtures are synthetic and generated in code wherever possible; tiny binary fixtures may go in `tests/fixtures/`
|
||||
@@ -234,7 +237,14 @@ run as server jobs whose progress comes from the events.
|
||||
500,000-photo library (Library open < 1 s on a new connection pool, filters < 200 ms; the OS cache is warm from
|
||||
building it) and the 100,000-frame rebuild from sidecars (400 sequences of 250 real photos, every column compared,
|
||||
< 120 s), each on SQLite and PostgreSQL. `.github/workflows/perf.yml` runs them weekly against PostgreSQL 17.
|
||||
- `Titano.Tools.Tests` covers the tools whose output CI relies on (fixtures annotations and exit codes).
|
||||
- `Titano.Tools.Tests` covers the tools whose output CI relies on (fixtures annotations and exit codes, the screenshot
|
||||
diff) and the test runner's outcomes.
|
||||
- Visual regression: CI compares the `--capture` screenshots with `tests/visual/baselines` (`Titano.Tools screenshots
|
||||
diff`; its README says how baselines are added). The capture draws the same pixels on any day: the sample's clock
|
||||
is fixed, formats are English and nothing animates.
|
||||
- PostgreSQL: CI prepares the service containers with `.github/scripts/postgres-ci-setup.sh` (MD5, cleartext and
|
||||
trust roles, TLS), so every authentication method and TLS mode of BRIEF §6.3 runs; `TITANO_TEST_PG_TLS=1` makes a
|
||||
server without TLS fail the TLS tests.
|
||||
|
||||
## 7. Localization
|
||||
|
||||
@@ -258,7 +268,7 @@ dotnet format whitespace Titano.slnx --verify-no-changes
|
||||
|
||||
| Workflow | Trigger | Does |
|
||||
|---|---|---|
|
||||
| `ci.yml` | push to `main`, pull requests | Windows + Linux build and tests, guards, i18n, XAML lint, format, fixtures (warnings when missing), screenshots, PostgreSQL 16/17, Docker smoke test |
|
||||
| `ci.yml` | push to `main`, pull requests | Windows + Linux build and tests, guards, i18n, XAML lint, format, fixtures (warnings when missing), screenshots and their pixel diff, installer test (install, run, upgrade, uninstall), PostgreSQL 16/17 (every authentication method, TLS), Docker smoke test |
|
||||
| `release.yml` | tag `v*` (or manual re-publish) | Tests, self-contained publish, optional signing, installers, portable and server zips, SHA256SUMS, release notes, multi-arch GHCR image, public releases repository update and GitHub release |
|
||||
| `docker.yml` | nightly | `ghcr.io/<owner>/titano-server:nightly` |
|
||||
| `perf.yml` | weekly, manual | Performance gates (SQLite, PostgreSQL 17) with timings in the job summary |
|
||||
Reference in new issue
Block a user