Skip to content

CI: install and uninstall a real installer on Linux, macOS and Windows - #71

Merged
guijacquemet merged 3 commits into
mainfrom
claude/installer-roundtrip
Dec 4, 2026
Merged

guijacquemet merged 3 commits into
mainfrom
claude/installer-roundtrip

Conversation

@guijacquemet

Copy link
Copy Markdown
Collaborator

Summary

This adds a CI test of the whole installer: it builds a real installer, installs it silently, checks the install, uninstalls it silently and checks what is left. It runs on Linux, macOS and Windows.

Both Windows bugs from the CAREamics 0.0.5 tests surfaced only on testers' computers: a dead "(Python …)" entry in Installed apps, and files left after an uninstall. This test catches that kind of bug before a release.

How

  • tests/smoke/make_demo_app.py makes a small demo app ("Demo App") from the live template:
    • It fills the placeholders as the setup form does.
    • It draws the images with Pillow and bundles the launcher icons.
    • It adds a package with a demoapp_lc_tools tools module.
    • It runs the release scripts as release_constructor.yml does: bump_version.py, bump_constructor.py, bump_Welcome_notebook.py and check_placeholders.py.
    • The installer is then built with the release's own create_constructor_environment.sh and build_installer_with_constructor.sh.
  • tests/smoke/installer_roundtrip.py:
    • Install: runs .exe /S /InstallationType=JustMe on Windows and .sh -b -p on Linux and macOS. It checks that:
      • the post-install log says "Post-install completed successfully." and "Tools registered";
      • the tools registry entry exists;
      • on Windows, Installed apps lists the app once, named "Demo App", with publisher and version 1.2.3, and its uninstaller exists.
    • Uninstall: runs Uninstall-Demo_App.exe /S on Windows and the bundled uninstall.sh elsewhere. On Windows the uninstaller hands over to a copy of itself in %TEMP%, so the script waits until it is done. It checks that:
      • the install folder is gone;
      • the app's registry entry is gone;
      • another app's registry entry is kept (user data stays);
      • on Windows, no Installed apps entry points to the folder.
    • --busy (Windows, diagnosis): a Python of the app runs during the uninstall, as a Jupyter server or a Fiji/napari tool worker may. The script prints what stays of the folder. Only the Installed apps and registry checks fail the run. This should show the leftover-files bug the testers reported.
  • .github/workflows/installer_roundtrip.yml runs on pull requests that change app/**, construct.yaml, environment.yaml, setup.py, requirements*.txt, .tools/{bash,python,templates}/**, tests/smoke/** or the release workflow, and by hand. The logs are uploaded as an artifact. Like tests.yml, it runs only in this repository, not in apps.

This branch starts from main, so the installer uses Tools pin v0.3.0-alpha.5. #70 moves the pin.

Checklist

  • Changes a button label, form field, workflow or artifact name, installer name or file path? It adds a workflow (installer_roundtrip.yml) and its log artifact. No user-facing name changes.
  • Bumped template_version if users must act: not needed (CI of the template only, nothing changes in apps)
  • Screenshots still valid

Generated by Claude Code

New workflow installer_roundtrip.yml (template PRs that change what an
installer is made of, and by hand), on Linux, macOS and Windows:

- tests/smoke/make_demo_app.py makes a demo app from the live template
  (placeholders filled in as the setup form does, images drawn, a package
  with a tools module) and runs the release scripts as the release does;
  the installer is built with the release's constructor scripts.
- tests/smoke/installer_roundtrip.py installs it silently and checks the
  post-install log, the tools registry entry and, on Windows, a single
  Installed apps entry with the app's name, publisher and version. It
  then uninstalls silently and checks that the folder, the registry
  entry and the Installed apps entry are gone, and that another app's
  registry entry is kept.
- On Windows a second round trip keeps a Python of the app running during
  the uninstall and prints what stays of the folder (diagnosis of files
  left after an uninstall).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01G3qp9AoUT3RtgWWsiVVarX
…yaml, as an app has

construct.yaml bundles notebooks/notebook_latest_versions.yaml, which an
app gets from update_on_notebook_change.yml; constructor failed without it.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01G3qp9AoUT3RtgWWsiVVarX
…install.bat logs no 'Tools registered' line)

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01G3qp9AoUT3RtgWWsiVVarX
@guijacquemet
guijacquemet marked this pull request as ready for review December 4, 2026 09:17
@guijacquemet
guijacquemet merged commit 61f6488 into main Dec 4, 2026
7 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.

2 participants