Skip to content

install.yml verifies cargo add termlens but never cargo install termlens-cli, so a broken CLI publish is invisible until a user hits it #326

Description

@vyncint

Todayinstall.yml answers "does cargo add termlens work from a fresh checkout?" on Linux and macOS, in two shapes (install.yml:70). Nothing anywhere runs cargo install termlens-cli against the published crate. #310 was the cost: termlens inspect --version exited 2 in the published 0.10.0 and 0.10.1 and was found by a user of the published binary, not by CI.

Fix. A third leg (both OSes) that installs from the registry, no cache, at the version the workflow already resolves: cargo install termlens-cli --version "=$VERSION" --locked. Then the documented contract, each as an exit-code assertion:

  • termlens --version and termlens inspect --version → 0, same string
  • termlens inspect sh -c 'printf hi' → 0, output contains the screen and the --- exited: trailer
  • termlens render --svg <a checked-in .snap> → 0, output starts with <svg
  • termlens diff a.snap b.snap → 1 when they differ, 0 when the same picture
  • termlens diff not-a-screen.txt a.snap → 2

Run it on the daily schedule and from release.yml's post-publish consumer step, so a bad CLI publish is red within the hour.

Done when

  • The published CLI is installed and exercised on Linux and macOS in CI.
  • Each exit code above is asserted, not just "the command ran".
  • A deliberately broken subcommand (locally, against a path install) makes the leg fail.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or requestgithub_actionsPull requests that update GitHub Actions code

    Projects

    No projects

      Milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions