Skip to content

Add install-nixie shared action - #360

Open
lodyai[bot] wants to merge 2 commits into
mainfrom
install-nixie-action
Open

Add install-nixie shared action#360
lodyai[bot] wants to merge 2 commits into
mainfrom
install-nixie-action

Conversation

@lodyai

@lodyai lodyai Bot commented Jul 19, 2026

Copy link
Copy Markdown
Contributor

Summary

  • add a reusable install-nixie composite action with configurable pins for Nixie CLI, Merman CLI, and Python
  • prefer locked cargo binstall packages for Merman and fall back to an exact locked cargo install source build when cargo-binstall is unavailable
  • document prerequisites and usage, add the action-local changelog, and register the action in the root catalogue
  • cover the binary-install path, source-build fallback, exact defaults, and missing-prerequisite failures with focused behavioural tests
  • ignore the pytest-cov .coverage database so validation and stop hooks do not dirty the working tree

Review walkthrough

  • Start with .github/actions/install-nixie/action.yml for the public inputs and installation contract.
  • Review .github/actions/install-nixie/tests/test_action.py for both Cargo paths and prerequisite failure coverage.
  • Finish with the action README, changelog, root action catalogue entry, and coverage ignore rule.

Validation

  • make check-fmt: passed.
  • make typecheck: passed.
  • make lint: passed.
  • make markdownlint: passed.
  • make nixie: passed.
  • git diff --check: passed.
  • All five focused install-nixie tests passed, including after the coverage ignore fix.
  • The full make test run reported 950 passed, 14 skipped, and 46 setup errors confined to untouched release-to-pypi-uv tests resolving action scripts under the repository-root scripts/ directory instead of their action directory.

References

Install pinned Nixie and Merman CLI releases through a reusable composite
action. Prefer `cargo binstall` for Merman while preserving a locked
`cargo install` fallback for runners without cargo-binstall.

Document the action contract and cover both installation paths and missing
prerequisite failures with focused behavioural tests.

@sourcery-ai sourcery-ai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sorry @LodyAI[bot], you have reached your weekly rate limit of 500000 diff characters.

Please try again later or upgrade to continue using Sourcery

@coderabbitai

coderabbitai Bot commented Jul 19, 2026

Copy link
Copy Markdown
Contributor

Review Change Stack

Note

Reviews paused

It looks like this branch is under active development. To avoid overwhelming you with review comments due to an influx of new commits, CodeRabbit has automatically paused this review. You can configure this behavior by changing the reviews.auto_review.auto_pause_after_reviewed_commits setting.

Use the following commands to manage reviews:

  • @coderabbitai resume to resume automatic reviews.
  • @coderabbitai review to trigger a single review.

Use the checkboxes below for quick actions:

  • ▶️ Resume reviews
  • 🔍 Trigger review

Summary

  • Added reusable install-nixie composite action with configurable pinned versions for Nixie CLI, Merman CLI, and Python.
  • Installs Merman using locked cargo binstall packages, with an exact locked cargo install fallback.
  • Added documentation, changelog, and root action catalogue entry.
  • Added behavioural tests covering installation paths, defaults, and missing prerequisites.
  • Updated .gitignore to exclude the pytest-cov .coverage database.

Testing

  • Focused tests passed.
  • Full test run: 950 passed, 14 skipped, with 46 setup errors confined to existing release-to-pypi-uv tests.

Walkthrough

Adds the install-nixie composite action, which installs pinned Nixie and Merman CLI versions, supports version overrides and installation fallback, and includes tests, documentation, changelog, repository registration, and coverage-output exclusion.

Changes

Install Nixie action

Layer / File(s) Summary
Action contract and installation flow
.github/actions/install-nixie/action.yml, .github/actions/install-nixie/tests/test_action.py
Define pinned inputs, validate cargo and uv, install Merman through cargo binstall or locked cargo install, install Nixie through uv, and test both paths plus prerequisite failures.
Action documentation and repository registration
.github/actions/install-nixie/README.md, .github/actions/install-nixie/CHANGELOG.md, README.md, .gitignore
Document inputs, usage, behaviour, and release history; register the action and ignore .coverage output.

Sequence Diagram(s)

sequenceDiagram
  participant Runner as GitHub Actions runner
  participant Action as install-nixie action
  participant Cargo as cargo
  participant UV as uv
  Runner->>Action: Invoke action with version inputs
  Action->>Cargo: Check prerequisites
  Action->>UV: Check prerequisites
  Action->>Cargo: Install merman-cli using binstall or locked install
  Action->>UV: Install nixie-cli with the selected Python version
Loading

Possibly related PRs

  • leynos/wildside#433: Relates to requiring Nixie and Merman CLI and installing Merman through cargo binstall.

Poem

Pinned tools arrive in line,
Cargo builds and UV shines.
If binstall cannot proceed,
A locked source fulfils the need.
Nixie maps the diagrams bright.


Caution

Pre-merge checks failed

Please resolve all errors before merging. Addressing warnings is optional.

  • Ignore

❌ Failed checks (1 error, 2 warnings)

Check name Status Explanation Resolution
Testing (Overall) ❌ Error Tests cover defaults and command paths, but never verify non-default input propagation; hardcoding the defaults would still pass. Add parametrised behavioural tests that execute the shell fragment with overridden nixie, merman, and python values and assert both installer commands receive them; keep the prerequisite failures.
User-Facing Documentation ⚠️ Warning No docs/users-guide.md exists, and install-nixie is only documented in the action README/root catalogue, not the required user guide. Add or update docs/users-guide.md with install-nixie usage, prerequisites, and version-pinning behaviour; keep any README text as a signpost only.
Testing (Unit And Behavioural) ⚠️ Warning Tests cover defaults, happy paths, and prerequisite errors, but never exercise overridden inputs or the PATH hand-off, so the action boundary is only partially covered. Add parameterised coverage for non-default nixie/merman/python inputs and assert the exported bin path (or run the action end-to-end via act) to cover the public boundary.
✅ Passed checks (17 passed)
Check name Status Explanation
Title check ✅ Passed The title matches the main change by naming the new install-nixie shared action.
Description check ✅ Passed The description clearly covers the new action, its install paths, tests, documentation, and ignore rule.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
Developer Documentation ✅ Passed PASS: The repo already has generic new-action guidance in docs/developers-guide.md, and no execplan/ADR mentions install-nixie; the PR adds the required action-local docs instead.
Module-Level Documentation ✅ Passed PASS: the only new Python module, .github/actions/install-nixie/tests/test_action.py, has a top-level docstring describing its behavioural-test purpose.
Testing (Property / Proof) ✅ Passed The change defines a small finite shell contract; explicit example tests already cover both install paths and prerequisite failures, so no property/proof recommendation is warranted.
Testing (Compile-Time / Ui) ✅ Passed No Rust/TS compile-time path exists; the new action is covered by focused behavioural contract tests, and the repo already uses this non-snapshot style for action manifests.
Unit Architecture ✅ Passed Keep the action as one install command with explicit inputs; tests inject cargo/uv via PATH stubs and cover both side-effect paths.
Domain Architecture ✅ Passed PASS: The PR only adds a GitHub composite action, docs, and tests; no domain model, persistence, or transport code is introduced or coupled.
Observability ✅ Passed Useful failure boundaries are logged via GitHub error annotations, and the fallback path emits a clear decision message; no metrics, tracing, or alerts are needed for this install-only action.
Security And Privacy ✅ Passed Pass: keep inputs quoted; the action adds no secrets, auth gaps, or broad permissions, and tests/docs use only fake version pins.
Performance And Resource Use ✅ Passed PASS: the action does a fixed sequence of prerequisite checks and at most two installer calls; no loops, recursion, unbounded collections, or repeated I/O hot paths appear.
Concurrency And State ✅ Passed PASS: the new action is a single sequential shell step; no shared mutable state, async tasks, locks, or interleaving-sensitive logic were introduced.
Architectural Complexity And Maintainability ✅ Passed PASS: The PR adds one explicit composite step, documented inputs/behaviour, and focused tests; no new layers, registries, hidden hooks, or cycles are introduced.
Rust Compiler Lint Integrity ✅ Passed No Rust sources or Cargo manifests were changed; the PR only touches GitHub Action docs/tests, so the lint-integrity check is not applicable.
✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch install-nixie-action

Comment @coderabbitai help to get the list of available commands.

codescene-access[bot]

This comment was marked as outdated.

Keep pytest-cov output from dirtying the working tree when repository gates
or stop hooks generate the `.coverage` SQLite database.
codescene-access[bot]

This comment was marked as outdated.

codescene-access[bot]

This comment was marked as outdated.

@leynos
leynos marked this pull request as ready for review July 21, 2026 14:55

@sourcery-ai sourcery-ai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sorry @leynos, you have reached your weekly rate limit of 500000 diff characters.

Please try again later or upgrade to continue using Sourcery

@chatgpt-codex-connector

Copy link
Copy Markdown

You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard.
To continue using code reviews, add credits to your account and enable them for code reviews in your settings.

@codescene-access codescene-access Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No quality gates enabled for this code.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 4

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In @.github/actions/install-nixie/action.yml:
- Line 44: After the uv tool installation command in the action’s install step,
append the directory returned by uv tool dir --bin to GITHUB_PATH so subsequent
workflow steps can locate nixie; update the associated behavioral test to assert
that this directory is exported.

In @.github/actions/install-nixie/README.md:
- Around line 25-44: Add a repository-local usage example to the install-nixie
README alongside the published-action example, using the required uses:
./.github/actions/install-nixie@v1 syntax. Keep the existing published-action
and version-override examples unchanged.

In @.github/actions/install-nixie/tests/test_action.py:
- Around line 85-92: Update the subprocess.run invocation in the test helper to
set check=False explicitly. Preserve the existing non-zero return-code
assertions and all other subprocess options unchanged.
- Around line 77-84: Update the test setup around the environment passed to the
action to parameterize injected Nixie, Merman, and Python versions with
non-default values. Assert end-to-end that each parameterized value is
propagated to both installer commands, while retaining coverage for the defaults
and validating the declared action input/output round trip.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: ASSERTIVE

Plan: Pro Plus

Run ID: 15359d58-0679-40d6-ae9b-d53d7d0c87d0

📥 Commits

Reviewing files that changed from the base of the PR and between c3141c3 and 1bc3a1c.

📒 Files selected for processing (6)
  • .github/actions/install-nixie/CHANGELOG.md
  • .github/actions/install-nixie/README.md
  • .github/actions/install-nixie/action.yml
  • .github/actions/install-nixie/tests/test_action.py
  • .gitignore
  • README.md
🔗 Linked repositories identified

CodeRabbit considers these linked repositories for cross-repo context during reviews:

  • leynos/polythene (auto-detected)

cargo install --locked merman-cli --version "=${MERMAN_VERSION}"
fi

uv tool install --python "${PYTHON_VERSION}" "nixie-cli==${NIXIE_VERSION}"

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🎯 Functional Correctness | 🟠 Major | ⚡ Quick win

Export the Nixie executable directory to subsequent workflow steps.

Append $(uv tool dir --bin) to $GITHUB_PATH after installation, then extend the behavioural test to assert the exported entry. uv tool install uses a configurable tool-bin directory, while $GITHUB_PATH is the GitHub Actions mechanism that exposes directories to later steps; without this, the documented nixie --renderer merman command fails on runners where that directory is absent from PATH. (docs.astral.sh)

         uv tool install --python "${PYTHON_VERSION}" "nixie-cli==${NIXIE_VERSION}"
+        printf '%s\n' "$(uv tool dir --bin)" >> "$GITHUB_PATH"
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In @.github/actions/install-nixie/action.yml at line 44, After the uv tool
installation command in the action’s install step, append the directory returned
by uv tool dir --bin to GITHUB_PATH so subsequent workflow steps can locate
nixie; update the associated behavioral test to assert that this directory is
exported.

Source: Linked repositories

Comment on lines +25 to +44
```yaml
- name: Set up Rust
uses: leynos/shared-actions/.github/actions/setup-rust@v1

- name: Install Nixie
uses: leynos/shared-actions/.github/actions/install-nixie@v1

- name: Validate Mermaid diagrams
run: nixie --renderer merman
```

To override the pinned versions:

```yaml
- uses: leynos/shared-actions/.github/actions/install-nixie@v1
with:
nixie-version: "1.1.0"
merman-version: "0.7.0"
python-version: "3.14"
```

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

📐 Maintainability & Code Quality | 🟡 Minor | ⚡ Quick win

Add the required repository-local usage example.

Add uses: ./.github/actions/install-nixie@v1 alongside the published-action example.

Triage: [type:docstyle]

As per coding guidelines, “Each action README must include … a usage example using uses: ./.github/actions/<name>@<major>.”

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In @.github/actions/install-nixie/README.md around lines 25 - 44, Add a
repository-local usage example to the install-nixie README alongside the
published-action example, using the required uses:
./.github/actions/install-nixie@v1 syntax. Keep the existing published-action
and version-override examples unchanged.

Sources: Coding guidelines, Path instructions

Comment on lines +77 to +84
env = {
**os.environ,
"CALLS_PATH": calls_path.as_posix(),
"MERMAN_VERSION": "0.7.0",
"NIXIE_VERSION": "1.1.0",
"PATH": stubs_dir.as_posix(),
"PYTHON_VERSION": "3.14",
}

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🎯 Functional Correctness | 🟡 Minor | ⚡ Quick win

Test overridden input pins end-to-end.

Parameterize the injected Nixie, Merman, and Python versions, then assert that non-default values reach both installer commands. Current tests only exercise defaults, so configurable input propagation is unprotected.

As per coding guidelines, “Contract tests must validate that declared action inputs and outputs round-trip correctly.”

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In @.github/actions/install-nixie/tests/test_action.py around lines 77 - 84,
Update the test setup around the environment passed to the action to
parameterize injected Nixie, Merman, and Python versions with non-default
values. Assert end-to-end that each parameterized value is propagated to both
installer commands, while retaining coverage for the defaults and validating the
declared action input/output round trip.

Source: Coding guidelines

Comment on lines +85 to +92
return subprocess.run( # noqa: S603,TID251 - exercise the bash fragment.
[bash, "-c", _install_script()],
cwd=tmp_path,
env=env,
capture_output=True,
text=True,
timeout=30,
)

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

📐 Maintainability & Code Quality | 🟡 Minor | ⚡ Quick win

Set check=False explicitly.

Preserve the intentional non-zero return-code assertions while satisfying Ruff’s PLW1510 finding.

🧰 Tools
🪛 Ruff (0.15.21)

[warning] 85-85: subprocess.run without explicit check argument

Add explicit check=False

(PLW1510)

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In @.github/actions/install-nixie/tests/test_action.py around lines 85 - 92,
Update the subprocess.run invocation in the test helper to set check=False
explicitly. Preserve the existing non-zero return-code assertions and all other
subprocess options unchanged.

Source: Linters/SAST tools

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.

0 participants