Skip to content

Smoke Test for Prebuilt Binaries #46

Smoke Test for Prebuilt Binaries

Smoke Test for Prebuilt Binaries #46

name: Smoke Test for Prebuilt Binaries
on:
workflow_dispatch:
jobs:
test-curl-install:
name: Test curl installer on ubuntu-slim
runs-on: ubuntu-slim
steps:
- uses: actions/checkout@v4
- name: Install celq via curl
run: |
curl --proto '=https' --tlsv1.2 -sSf https://get-celq.github.io/install.sh | bash -s -- --to ~/.cargo/bin
- name: Print celq version
run: ~/.cargo/bin/celq --version
- name: Run smoke test
run: sh .github/scripts/smoke-test.sh ~/.cargo/bin/celq
test-curl-install-with-checksum:
name: Test curl installer with checksum verification on ubuntu-slim
runs-on: ubuntu-slim
needs: test-curl-install
steps:
- uses: actions/checkout@v4
- name: Install GitHub CLI
run: |
sudo apt-get update
sudo apt-get install -y gh
- name: Download and verify checksum
run: |
curl --proto '=https' --tlsv1.2 -sSf https://get-celq.github.io/install.sh > install.sh
- name: Install celq with checksum verification
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
bash install.sh --verify-checksum --to ~/.cargo/bin
- name: Print celq version
run: ~/.cargo/bin/celq --version
- name: Run smoke test
run: sh .github/scripts/smoke-test.sh ~/.cargo/bin/celq
test-curl-install-with-attestation:
name: Test curl installer with attestation verification on ubuntu-slim
runs-on: ubuntu-slim
needs: test-curl-install-with-checksum
steps:
- uses: actions/checkout@v4
- name: Install GitHub CLI
run: |
sudo apt-get update
sudo apt-get install -y gh
- name: Download and verify installer
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
curl --proto '=https' --tlsv1.2 -sSf https://get-celq.github.io/install.sh > install.sh
gh attestation verify install.sh --repo IvanIsCoding/celq
- name: Install celq with attestation verification
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
bash install.sh --verify-attestation --to ~/.cargo/bin
- name: Print celq version
run: ~/.cargo/bin/celq --version
- name: Run smoke test
run: sh .github/scripts/smoke-test.sh ~/.cargo/bin/celq
test-curl-install-windows:
name: Test curl installer on Windows (Git Bash)
runs-on: windows-latest
defaults:
run:
shell: bash
steps:
- uses: actions/checkout@v4
- name: Install celq via curl
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
curl --proto '=https' --tlsv1.2 -sSf https://get-celq.github.io/install.sh | bash
- name: Print celq version
run: ~/.cargo/bin/celq --version
- name: Run smoke test
run: sh .github/scripts/smoke-test.sh ~/.cargo/bin/celq
test-npm-install:
name: Test npm install (global) on ubuntu-slim
runs-on: ubuntu-slim
steps:
- uses: actions/checkout@v4
- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: '20'
- name: Install celq globally via npm
run: npm install -g celq
- name: Print celq version
run: celq --version
- name: Run smoke test
run: sh .github/scripts/smoke-test.sh "$(which celq)"
test-pip-install:
name: Test pip install (global) on ubuntu-slim
runs-on: ubuntu-slim
steps:
- uses: actions/checkout@v4
- name: Setup Python
uses: actions/setup-python@v5
with:
python-version: '3.12'
- name: Install celq globally via pip
run: pip install celq
- name: Print celq version
run: celq --version
- name: Run smoke test
run: sh .github/scripts/smoke-test.sh "$(which celq)"
test-brew-install:
name: Test brew install on macOS (arm)
runs-on: macos-15
steps:
- uses: actions/checkout@v4
- name: Install celq via Homebrew
run: brew install get-celq/tap/celq
- name: Print celq version
run: celq --version
- name: Run smoke test
run: sh .github/scripts/smoke-test.sh "$(which celq)"
test-linuxbrew-install:
name: Test brew install on Linux (x86_64)
runs-on: ubuntu-slim
needs: test-brew-install
steps:
- uses: actions/checkout@v4
- name: Set up Homebrew
id: set-up-homebrew
uses: Homebrew/actions/setup-homebrew@master
- name: Install celq via Homebrew
run: brew install get-celq/tap/celq
- name: Print celq version
run: celq --version
- name: Run smoke test
run: sh .github/scripts/smoke-test.sh "$(which celq)"
test-cargo-binstall:
name: Test cargo-binstall on ubuntu-latest
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Install cargo-binstall
uses: cargo-bins/cargo-binstall@main
- name: Install celq via cargo-binstall
run: cargo binstall celq -y
- name: Print celq version
run: celq --version
- name: Run smoke test
run: sh .github/scripts/smoke-test.sh "$(which celq)"
test-gha-install-action:
name: Test taiki-e/install-action on ubuntu-slim
runs-on: ubuntu-slim
needs: test-cargo-binstall
steps:
- uses: actions/checkout@v4
- uses: taiki-e/install-action@v2
with:
tool: celq
- name: Print celq version
run: celq --version
- name: Run smoke test
run: sh .github/scripts/smoke-test.sh "$(which celq)"
test-scoop-install:
name: Test scoop install on Windows (Git Bash)
runs-on: windows-latest
needs: test-curl-install-windows
defaults:
run:
shell: bash
steps:
- uses: actions/checkout@v4
- name: Install Scoop
shell: pwsh
run: |
Set-ExecutionPolicy -ExecutionPolicy RemoteSigned -Scope CurrentUser
Invoke-RestMethod -Uri https://get.scoop.sh | Invoke-Expression
echo "$env:USERPROFILE\scoop\shims" >> $env:GITHUB_PATH
- name: Install celq via Scoop
shell: pwsh
run: |
scoop bucket add get-celq https://github.com/get-celq/scoop-bucket
scoop install get-celq/celq
- name: Print celq version
run: ~/scoop/shims/celq --version
- name: Run smoke test
run: sh .github/scripts/smoke-test.sh ~/scoop/shims/celq
test-choco-install:
name: Test Chocolatey install on Windows (Git Bash)
runs-on: windows-latest
defaults:
run:
shell: bash
steps:
- uses: actions/checkout@v4
- name: Install celq via Chocolatey
shell: pwsh
run: |
choco install celq -y
- name: Print celq version
run: celq --version
- name: Run smoke test
run: sh .github/scripts/smoke-test.sh "$(which celq)"
test-winget-install:
name: Test WinGet install on Windows (Git Bash)
runs-on: windows-latest
needs: test-scoop-install
defaults:
run:
shell: bash
steps:
- uses: actions/checkout@v4
- name: Install celq via WinGet
shell: pwsh
run: |
winget install IvanIsCoding.celq --scope machine --disable-interactivity --accept-source-agreements
# Add celq to PATH for subsequent steps
$env:Path = [System.Environment]::GetEnvironmentVariable("Path","Machine") + ";" + [System.Environment]::GetEnvironmentVariable("Path","User")
$celqPath = (Get-Command celq).Source
$celqDir = Split-Path $celqPath -Parent
Add-Content $env:GITHUB_PATH $celqDir
- name: Print celq version
run: celq --version
- name: Run smoke test
run: sh .github/scripts/smoke-test.sh "$(which celq)"
test-pixi-install:
name: Test Pixi (conda-forge global) on ubuntu-24.04
runs-on: ubuntu-24.04
steps:
- uses: actions/checkout@v4
- name: Install Pixi
uses: prefix-dev/setup-pixi@v0.9.3
with:
pixi-version: v0.62.2
cache: false
run-install: false
global-environments: |
celq
- name: Print celq version
run: |
celq --version
- name: Run smoke test
run: sh .github/scripts/smoke-test.sh "$(which celq)"
test-mise-install:
name: Test mise (conda backend) on Windows (Git Bash)
runs-on: windows-latest
needs: test-pixi-install
defaults:
run:
shell: bash
steps:
- uses: actions/checkout@v4
- name: Install celq via mise
uses: jdx/mise-action@v3
with:
cache: false
experimental: true
github_token: ${{ secrets.GITHUB_TOKEN }}
mise_toml: |
[tools]
"conda:celq" = "latest"
- name: Print celq version
run: celq --version
- name: Run smoke test
run: sh .github/scripts/smoke-test.sh "$(which celq)"
test-nix-flake:
name: Test Nix flake validity and run
runs-on: ubuntu-24.04
steps:
- name: Install Nix
uses: cachix/install-nix-action@v26
with:
nix_path: nixpkgs=channel:nixos-unstable
extra_nix_config: |
experimental-features = nix-command flakes
- name: Check flake
run: nix flake check --no-build github:IvanIsCoding/celq
- name: Show flake metadata
run: nix flake metadata github:IvanIsCoding/celq
- name: Show flake outputs (without building)
run: nix flake show github:IvanIsCoding/celq
- name: Build Flake and show celq version
run: nix run github:IvanIsCoding/celq -- --version
test-nix-flake-dev:
name: Test Nix flake (dev) validity and run
runs-on: ubuntu-24.04
steps:
- name: Install Nix
uses: cachix/install-nix-action@v26
with:
nix_path: nixpkgs=channel:nixos-unstable
extra_nix_config: |
experimental-features = nix-command flakes
- name: Build Flake with dev version and show celq version
run: nix run github:IvanIsCoding/celq#dev -- --version
test-freebsd-install:
name: Test FreeBSD 14.4 (x86_64)
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Get latest release version
id: get_version
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
VERSION=$(curl -s https://api.github.com/repos/IvanIsCoding/celq/releases/latest | grep '"tag_name":' | sed -E 's/.*"([^"]+)".*/\1/')
echo "version=$VERSION" >> $GITHUB_OUTPUT
echo "Latest version: $VERSION"
- name: Test on FreeBSD
uses: vmactions/freebsd-vm@v1
with:
release: '14.4'
usesh: true
prepare: |
pkg install -y curl
run: |
VERSION=${{ steps.get_version.outputs.version }}
RELEASE_URL=https://github.com/IvanIsCoding/celq/releases/download/${VERSION}
PLATFORM=x86_64
echo "Installing celq ${VERSION} for FreeBSD ${PLATFORM}..."
fetch ${RELEASE_URL}/celq-freebsd-${PLATFORM}.tar.gz
tar xzf celq-freebsd-${PLATFORM}.tar.gz
chmod +x celq
mv celq /usr/local/bin/
celq --version
sh .github/scripts/smoke-test.sh "$(which celq)"
test-results-summary:
name: Installation Tests Summary
needs:
- test-curl-install
- test-curl-install-with-attestation
- test-curl-install-with-checksum
- test-curl-install-windows
- test-npm-install
- test-pip-install
- test-brew-install
- test-linuxbrew-install
- test-cargo-binstall
- test-gha-install-action
- test-scoop-install
- test-choco-install
- test-winget-install
- test-pixi-install
- test-mise-install
- test-nix-flake
- test-nix-flake-dev
- test-freebsd-install
runs-on: ubuntu-24.04
if: always()
steps:
- name: Check all installation methods
run: |
echo "Installation test results:"
echo "- curl installer: ${{ needs.test-curl-install.result }}"
echo "- curl installer (attestation): ${{ needs.test-curl-install-with-attestation.result }}"
echo "- curl installer (checksum): ${{ needs.test-curl-install-with-checksum.result }}"
echo "- curl installer (Windows): ${{ needs.test-curl-install-windows.result }}"
echo "- npm install: ${{ needs.test-npm-install.result }}"
echo "- pip install: ${{ needs.test-pip-install.result }}"
echo "- brew install: ${{ needs.test-brew-install.result }}"
echo "- linuxbrew install: ${{ needs.test-linuxbrew-install.result }}"
echo "- cargo-binstall: ${{ needs.test-cargo-binstall.result }}"
echo "- GitHub Actions install action: ${{ needs.test-gha-install-action.result }}"
echo "- scoop install: ${{ needs.test-scoop-install.result }}"
echo "- chocolatey install: ${{ needs.test-choco-install.result }}"
echo "- winget install: ${{ needs.test-winget-install.result }}"
echo "- pixi (conda-forge): ${{ needs.test-pixi-install.result }}"
echo "- mise (conda backend): ${{ needs.test-mise-install.result }}"
echo "- nix flake: ${{ needs.test-nix-flake.result }}"
echo "- nix flake (latest): ${{ needs.test-nix-flake-dev.result }}"
echo "- freebsd install: ${{ needs.test-freebsd-install.result }}"
if [ "${{ needs.test-curl-install.result }}" != "success" ] || \
[ "${{ needs.test-curl-install-with-attestation.result }}" != "success" ] || \
[ "${{ needs.test-curl-install-with-checksum.result }}" != "success" ] || \
[ "${{ needs.test-curl-install-windows.result }}" != "success" ] || \
[ "${{ needs.test-npm-install.result }}" != "success" ] || \
[ "${{ needs.test-pip-install.result }}" != "success" ] || \
[ "${{ needs.test-brew-install.result }}" != "success" ] || \
[ "${{ needs.test-linuxbrew-install.result }}" != "success" ] || \
[ "${{ needs.test-cargo-binstall.result }}" != "success" ] || \
[ "${{ needs.test-gha-install-action.result }}" != "success" ] || \
[ "${{ needs.test-scoop-install.result }}" != "success" ] || \
[ "${{ needs.test-choco-install.result }}" != "success" ] || \
[ "${{ needs.test-winget-install.result }}" != "success" ] || \
[ "${{ needs.test-pixi-install.result }}" != "success" ] || \
[ "${{ needs.test-mise-install.result }}" != "success" ] || \
[ "${{ needs.test-nix-flake.result }}" != "success" ] || \
[ "${{ needs.test-nix-flake-dev.result }}" != "success" ] || \
[ "${{ needs.test-freebsd-install.result }}" != "success" ]; then
echo "One or more installation methods failed!"
exit 1
fi
echo "All installation methods passed!"