Skip to content

ci: add installer.sh test automation#30

Open
pjcdawkins wants to merge 3 commits intomainfrom
test-installer-sh
Open

ci: add installer.sh test automation#30
pjcdawkins wants to merge 3 commits intomainfrom
test-installer-sh

Conversation

@pjcdawkins
Copy link
Contributor

Summary

  • Add a GitHub Actions workflow that tests installer.sh across distros: Debian (apt), Ubuntu (apt), Fedora (yum), Alpine (apk), Debian (raw), and macOS (homebrew + raw)
  • Add a local Docker-based test script (scripts/test/installer.sh) for quick iteration without pushing to CI
  • Support an optional VERSION parameter for testing against pre-releases (where /releases/latest returns nothing)

Test plan

  • Run scripts/test/installer.sh locally — all Linux methods pass
  • Trigger workflow_dispatch on this branch to verify all CI matrix cells pass

🤖 Generated with Claude Code

pjcdawkins and others added 3 commits March 15, 2026 21:52
Add a GitHub Actions workflow that tests installer.sh across distros:
- Linux: Debian (apt), Ubuntu (apt), Fedora (yum), Alpine (apk), Debian (raw)
- macOS: homebrew and raw methods

Also add a local Docker-based test script (scripts/test/installer.sh) for
quick iteration without pushing to CI.

Tests run against published packages/releases. The installer script itself
comes from the current commit so changes to it are tested even though the
installed packages come from live repos.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Show all Docker output (installer progress and errors) instead of
suppressing it. Use -qq/-q flags on package managers to reduce noise
from prerequisite installs while keeping installer output visible.

Add a comment noting that macOS methods are CI-only.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
The raw install method needs /releases/latest on GitHub, which only
returns non-prerelease versions. When only pre-releases exist, this
fails. Allow passing a specific version to work around this.

Local script: VERSION=5.0.4 scripts/test/installer.sh
Workflow: workflow_dispatch input field

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Copilot AI review requested due to automatic review settings March 15, 2026 22:01
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Adds CI and local automation to validate installer.sh across multiple platforms/methods, improving confidence that install paths work across common distros and macOS.

Changes:

  • Introduces a local Docker-based test runner (scripts/test/installer.sh) for Linux installer methods.
  • Adds a GitHub Actions workflow (.github/workflows/test-installer.yml) to test installer.sh across a Linux container matrix and macOS methods.
  • Adds support for passing a specific VERSION via workflow dispatch input to test pre-releases.

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 4 comments.

File Description
scripts/test/installer.sh Local Docker test harness to exercise installer.sh across several Linux distros/methods.
.github/workflows/test-installer.yml CI workflow to run installer.sh in a Linux container matrix plus macOS (homebrew/raw).

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

You can also share your feedback on Copilot code review. Take the survey.

Comment on lines +42 to +58
steps:
- name: Install prerequisites
run: |
case "${{ matrix.method }}" in
apt)
apt-get update && apt-get install -y curl ca-certificates
;;
yum)
yum install -y curl
;;
apk)
apk add --no-cache curl ca-certificates
;;
raw)
apt-get update && apt-get install -y curl ca-certificates gzip
;;
esac
Comment on lines +25 to +41
version_flag=""
if [ -n "$VERSION" ]; then
version_flag="-e VERSION=$VERSION"
fi

if docker run --rm \
-v "$(pwd)/installer.sh:/installer.sh:ro" \
-e INSTALL_METHOD="$method" \
$version_flag \
"$image" \
sh -c "${prereqs}sh /installer.sh && upsun --version"; then
echo "--- PASS: ${label} ---"
pass=$((pass + 1))
else
echo "--- FAIL: ${label} ---"
fail=$((fail + 1))
errors="${errors} ${label}\n"
Comment on lines +63 to +68
- name: Run installer
env:
INSTALL_METHOD: ${{ matrix.method }}
GITHUB_TOKEN: ${{ github.token }}
VERSION: ${{ inputs.version }}
run: sh installer.sh
Comment on lines +87 to +93
- name: Run installer
env:
INSTALL_METHOD: ${{ matrix.method }}
GITHUB_TOKEN: ${{ github.token }}
VERSION: ${{ inputs.version }}
run: sh installer.sh

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