mirror of
https://github.com/starship/starship.git
synced 2026-06-21 02:02:14 +07:00
6e6664dea6
* ci: add install script workflow Add GitHub Actions workflow to test install.sh script. This prevents regressions like the one reported in issue #7133 where changes to the install script broke the recommended installation method. The workflow includes: - shellcheck for script linting (temporarily excludes SC3045) - Integration test using curl piped to sh as documented on starship.rs Signed-off-by: cappyzawa <cappyzawa@gmail.com> * fixup! ci: add install script workflow Signed-off-by: cappyzawa <cappyzawa@gmail.com> * fixup! ci: add install script workflow Signed-off-by: cappyzawa <cappyzawa@gmail.com> * ci: add shfmt check and format install scripts Add shfmt job to install-script workflow for consistent shell script formatting. Apply shfmt to all scripts under install/ directory. Signed-off-by: cappyzawa <cappyzawa@gmail.com> --------- Signed-off-by: cappyzawa <cappyzawa@gmail.com>
53 lines
1.3 KiB
YAML
53 lines
1.3 KiB
YAML
name: Install Script
|
|
on:
|
|
push:
|
|
paths:
|
|
- "install/**"
|
|
pull_request:
|
|
paths:
|
|
- "install/**"
|
|
|
|
jobs:
|
|
shellcheck:
|
|
name: Shellcheck [Linter]
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- name: Setup | Checkout
|
|
uses: actions/checkout@v6
|
|
|
|
- name: Lint | Run shellcheck
|
|
run: shellcheck --severity=warning install/**/*.sh
|
|
|
|
shfmt:
|
|
name: Shfmt [Formatter]
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- name: Setup | Checkout
|
|
uses: actions/checkout@v6
|
|
|
|
- name: Setup | Install shfmt
|
|
run: |
|
|
curl -sS https://webi.sh/shfmt | sh
|
|
echo "$HOME/.local/bin" >> "$GITHUB_PATH"
|
|
|
|
- name: Format | Check shfmt
|
|
run: shfmt -d install/**/*.sh
|
|
|
|
test_install_script:
|
|
name: Test Install Script
|
|
strategy:
|
|
fail-fast: false
|
|
matrix:
|
|
os: [ubuntu-latest, macos-latest]
|
|
runs-on: ${{ matrix.os }}
|
|
steps:
|
|
- name: Setup | Checkout
|
|
uses: actions/checkout@v6
|
|
|
|
- name: Test | Piped execution with curl
|
|
run: |
|
|
# Test the installation method described at https://starship.rs/
|
|
mkdir -p "$HOME/.test-install"
|
|
curl -sS "file://$(pwd)/install/install.sh" | sh -s -- --yes --bin-dir "$HOME/.test-install"
|
|
"$HOME/.test-install/starship" --version
|