Skip to content

ci: test installer compatibility across Linux distros - #98

Open
Mresyzz wants to merge 7 commits into
latitudesh:mainfrom
Mresyzz:test/opsscript-gate-installer
Open

Mresyzz wants to merge 7 commits into
latitudesh:mainfrom
Mresyzz:test/opsscript-gate-installer

Conversation

@Mresyzz

@Mresyzz Mresyzz commented Oct 2, 2026 •

Copy link
Copy Markdown

Adds a four-image installer smoke test (Debian 12, Ubuntu 22.04/24.04, Alpine 3.20). Bash and download tools are installed explicitly. The workflow embeds the current installer into a temporary script, runs it in a subshell with its exit behavior preserved, and checks the installed $HOME/.lsh/lsh --version in the same container. Explicit exit 0 cannot bypass the binary check. Packaging configuration changes also trigger the workflow.

Validation at head 3afa715: all four images passed, with installed binary execution and JSON report uploads.
https://github.com/Mresyzz/cli/actions/runs/38146383228

An earlier run caught a non-gzip download on Ubuntu 22.04: the installer printed “Installation finished” but the binary was absent, and the postcondition correctly failed. This is why installation postconditions matter; that single download failure was not evidence of a distro-specific defect.

Comment thread .github/workflows/opsscript-gate.yml Outdated
if: always()
uses: actions/upload-artifact@v4
with:
name: opsscript-gate-${{ matrix.image }}

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P1 Report uploads fail for every image. Each image name contains :, so name: opsscript-gate-${{ matrix.image }} gives actions/upload-artifact@v4 an invalid artifact name. The upload step fails even if the installer produced a report. Use an artifact-safe name for each image.

Prompt To Fix With AI
This is a comment left during a code review.
Path: .github/workflows/opsscript-gate.yml
Line: 52

Comment:
**Report uploads fail for every image.** Each image name contains `:`, so `name: opsscript-gate-${{ matrix.image }}` gives `actions/upload-artifact@v4` an invalid artifact name. The upload step fails even if the installer produced a report. Use an artifact-safe name for each image.

---

For each issue above, determine whether it is valid and should be fixed. If so, fix it directly.

Comment thread .github/workflows/opsscript-gate.yml Outdated
Comment on lines +37 to +40
uses: Mresyzz/opsscript-gate@v0.8.0
with:
script-path: install.sh
matrix: ${{ matrix.image }}

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P1 Failed installs can pass. The workflow runs install.sh but never checks whether lsh was installed. The script continues after a failed download, extraction, or move and ends with a successful echo, so its exit code can be zero without an installed binary. Check for and run the installed binary inside each image.

Prompt To Fix With AI
This is a comment left during a code review.
Path: .github/workflows/opsscript-gate.yml
Line: 37-40

Comment:
**Failed installs can pass.** The workflow runs `install.sh` but never checks whether `lsh` was installed. The script continues after a failed download, extraction, or move and ends with a successful `echo`, so its exit code can be zero without an installed binary. Check for and run the installed binary inside each image.

---

For each issue above, determine whether it is valid and should be fixed. If so, fix it directly.

Comment on lines +5 to +12
paths:
- install.sh
- .github/workflows/opsscript-gate.yml
push:
branches: [main]
paths:
- install.sh
- .github/workflows/opsscript-gate.yml

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P2 Packaging changes skip the check. install.sh expects a specific archive name and folder layout, both set by .goreleaser.yaml. A change to that file alone can break the download or extraction, but neither path filter starts this workflow for it. Add .goreleaser.yaml to both filters.

Suggested change
paths:
- install.sh
- .github/workflows/opsscript-gate.yml
push:
branches: [main]
paths:
- install.sh
- .github/workflows/opsscript-gate.yml
paths:
- install.sh
- .goreleaser.yaml
- .github/workflows/opsscript-gate.yml
push:
branches: [main]
paths:
- install.sh
- .goreleaser.yaml
- .github/workflows/opsscript-gate.yml
Prompt To Fix With AI
This is a comment left during a code review.
Path: .github/workflows/opsscript-gate.yml
Line: 5-12

Comment:
**Packaging changes skip the check.** `install.sh` expects a specific archive name and folder layout, both set by `.goreleaser.yaml`. A change to that file alone can break the download or extraction, but neither path filter starts this workflow for it. Add `.goreleaser.yaml` to both filters.

```suggestion
    paths:
      - install.sh
      - .goreleaser.yaml
      - .github/workflows/opsscript-gate.yml
  push:
    branches: [main]
    paths:
      - install.sh
      - .goreleaser.yaml
      - .github/workflows/opsscript-gate.yml
```

---

For each issue above, determine whether it is valid and should be fixed. If so, fix it directly.

Note: If this suggestion doesn't match your team's coding style, reply to this and let me know. I'll remember it for next time!

@Mresyzz

Mresyzz commented Oct 2, 2026

Copy link
Copy Markdown
Author

I validated the workflow on the fork before leaving the PR in its final form:

  • Run 36985657030 passed on Debian 12, Ubuntu 22.04, Ubuntu 24.04, and Alpine 3.20.
  • The check exercised the real download path, package setup, archive extraction, and PATH setup.
  • The final workflow is scoped to install.sh changes and keeps the checkout credentials disabled.

The manual validation trigger used for the run was removed from the final commit.

@cursor cursor 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.

Cursor Bugbot has reviewed your changes and found 1 potential issue.

Fix All in Cursor

❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.

Want reviews to match your repository better? Bugbot Learning can learn team-specific rules from PR activity. A team admin can enable Learning in the Cursor dashboard.

Reviewed by Cursor Bugbot for commit ca2ab96. Configure here.

Comment thread .github/workflows/opsscript-gate.yml
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