2007f7a922
Bumps the actions-minor-patch group with 3 updates: [actions/checkout](https://github.com/actions/checkout), [ossf/scorecard-action](https://github.com/ossf/scorecard-action) and [github/codeql-action/upload-sarif](https://github.com/github/codeql-action). Updates `actions/checkout` from 7.0.0 to 7.0.1 - [Release notes](https://github.com/actions/checkout/releases) - [Changelog](https://github.com/actions/checkout/blob/main/CHANGELOG.md) - [Commits](https://github.com/actions/checkout/compare/9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0...3d3c42e5aac5ba805825da76410c181273ba90b1) Updates `ossf/scorecard-action` from 2.4.3 to 2.4.4 - [Release notes](https://github.com/ossf/scorecard-action/releases) - [Changelog](https://github.com/ossf/scorecard-action/blob/main/RELEASE.md) - [Commits](https://github.com/ossf/scorecard-action/compare/4eaacf0543bb3f2c246792bd56e8cdeffafb205a...2d1146689b8cda280b9bc96326124645441f03bc) Updates `github/codeql-action/upload-sarif` from 4.37.1 to 4.37.3 - [Release notes](https://github.com/github/codeql-action/releases) - [Changelog](https://github.com/github/codeql-action/blob/main/CHANGELOG.md) - [Commits](https://github.com/github/codeql-action/compare/7188fc363630916deb702c7fdcf4e481b751f97a...e4fba868fa4b1b91e1fdab776edc8cfbe6e9fb81) --- updated-dependencies: - dependency-name: actions/checkout dependency-version: 7.0.1 dependency-type: direct:production update-type: version-update:semver-patch dependency-group: actions-minor-patch - dependency-name: ossf/scorecard-action dependency-version: 2.4.4 dependency-type: direct:production update-type: version-update:semver-patch dependency-group: actions-minor-patch - dependency-name: github/codeql-action/upload-sarif dependency-version: 4.37.3 dependency-type: direct:production update-type: version-update:semver-patch dependency-group: actions-minor-patch ... Signed-off-by: dependabot[bot] <support@github.com>
101 lines
3.5 KiB
YAML
101 lines
3.5 KiB
YAML
# Smoke-test scripts/install.sh on Linux + macOS against the latest published
|
|
# release. The script is the public install path served at get.gortex.dev, so
|
|
# any change must prove it still produces a working `gortex` binary. Coverage:
|
|
# Linux x64 (ubuntu-latest) and macOS arm64 (macos-14). Intel macOS is not
|
|
# tested here — GitHub retired its Intel (macos-13) runners, and install.sh is
|
|
# arch-agnostic (only the downloaded artifact differs). Linux arm64 is
|
|
# exercised in the release flow.
|
|
name: install-script
|
|
|
|
on:
|
|
pull_request:
|
|
paths:
|
|
- "scripts/install.sh"
|
|
- "scripts/install.ps1"
|
|
- ".github/workflows/install-script.yml"
|
|
push:
|
|
branches: [main]
|
|
paths:
|
|
- "scripts/install.sh"
|
|
- "scripts/install.ps1"
|
|
|
|
jobs:
|
|
posix-syntax:
|
|
# Cheap pre-check: catch bashisms before we spin up the full matrix.
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
|
|
- name: Install shellcheck
|
|
run: sudo apt-get update && sudo apt-get install -y shellcheck
|
|
- name: shellcheck (sh dialect)
|
|
run: shellcheck -s sh scripts/install.sh
|
|
- name: POSIX dash syntax check
|
|
run: dash -n scripts/install.sh
|
|
|
|
install:
|
|
needs: posix-syntax
|
|
strategy:
|
|
fail-fast: false
|
|
matrix:
|
|
os: [ubuntu-latest, macos-14]
|
|
runs-on: ${{ matrix.os }}
|
|
steps:
|
|
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
|
|
|
|
- name: Run install.sh into an isolated prefix
|
|
run: |
|
|
set -eux
|
|
export GORTEX_INSTALL_DIR="$RUNNER_TEMP/bin"
|
|
export GORTEX_NO_PATH=1
|
|
# Don't clobber the runner's real shell rc; HOME points to a tmp dir.
|
|
export HOME="$RUNNER_TEMP/home"
|
|
mkdir -p "$HOME"
|
|
./scripts/install.sh
|
|
|
|
- name: Verify binary runs
|
|
run: |
|
|
set -eux
|
|
"$RUNNER_TEMP/bin/gortex" version
|
|
|
|
- name: Re-run install (idempotency + backup)
|
|
run: |
|
|
set -eux
|
|
export GORTEX_INSTALL_DIR="$RUNNER_TEMP/bin"
|
|
export GORTEX_NO_PATH=1
|
|
export HOME="$RUNNER_TEMP/home"
|
|
./scripts/install.sh
|
|
# Previous binary should have been moved aside.
|
|
test -f "$RUNNER_TEMP/bin/gortex.previous"
|
|
"$RUNNER_TEMP/bin/gortex" version
|
|
|
|
- name: PATH update writes idempotent marker block
|
|
run: |
|
|
set -eux
|
|
export GORTEX_INSTALL_DIR="$RUNNER_TEMP/bin"
|
|
export HOME="$RUNNER_TEMP/home2"
|
|
export SHELL=/bin/bash
|
|
mkdir -p "$HOME"
|
|
touch "$HOME/.bashrc"
|
|
./scripts/install.sh
|
|
./scripts/install.sh
|
|
# Marker block must appear exactly once.
|
|
count=$(grep -c '^# >>> gortex installer >>>' "$HOME/.bashrc")
|
|
test "$count" = "1"
|
|
|
|
powershell-syntax:
|
|
# Parse-check install.ps1 — the PowerShell counterpart of the
|
|
# posix-syntax job. A full install can only run once a release ships
|
|
# Windows artifacts, so this validates that the script parses without
|
|
# errors on every change.
|
|
runs-on: windows-latest
|
|
steps:
|
|
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
|
|
- name: Parse install.ps1
|
|
shell: pwsh
|
|
run: |
|
|
$errors = $null
|
|
[System.Management.Automation.Language.Parser]::ParseFile(
|
|
(Resolve-Path scripts/install.ps1), [ref]$null, [ref]$errors) | Out-Null
|
|
if ($errors) { $errors; exit 1 }
|
|
Write-Host "install.ps1 parses cleanly"
|