Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
33 changes: 13 additions & 20 deletions .github/workflows/pr-posix-script-setup-version-tests.yml
Original file line number Diff line number Diff line change
@@ -1,12 +1,11 @@
name: POSIX Script Setup Version Logic Tests
name: POSIX Script Slim URL Logic Tests

on:
pull_request:

jobs:
# Test that setup is NOT disabled for v3.24+ (where lando setup exists)
# This test will FAIL on main due to inverted SLIM_SETUPY logic
setup-enabled-for-v324-plus:
# v3.24+ should NOT append -slim to URL (unified binary)
no-slim-suffix-for-v324-plus:
runs-on: ${{ matrix.os }}
env:
LANDO_GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
Expand All @@ -22,24 +21,21 @@ jobs:
os: macos-14
steps:
- name: Checkout code
uses: actions/checkout@v6
with:
fetch-depth: 0
- name: Run setup-lando with debug for v3.24+
id: setup
uses: actions/checkout@v4
- name: Verify no -slim suffix for v3.24+
shell: bash
run: |
./setup-lando.sh --version=${{ matrix.version }} --debug 2>&1 | tee setup-output.log
if grep -q "disabled autosetup" setup-output.log; then
echo "::error::BUG: Setup was incorrectly disabled for v3.24+"
if grep -q "autoslimin url" setup-output.log; then
echo "::error::BUG: -slim suffix incorrectly added for v3.24+"
exit 1
fi
- name: Verify lando installed
shell: bash
run: lando version

# Test that setup IS disabled for v3.23.x and below (where lando setup doesn't exist)
setup-disabled-for-pre-v324:
# pre-v3.24 SHOULD append -slim to URL (separate slim/fat builds existed)
slim-suffix-for-pre-v324:
runs-on: ${{ matrix.os }}
env:
LANDO_GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
Expand All @@ -53,16 +49,13 @@ jobs:
os: macos-14
steps:
- name: Checkout code
uses: actions/checkout@v6
with:
fetch-depth: 0
- name: Run setup-lando with debug for pre-v3.24
id: setup
uses: actions/checkout@v4
- name: Verify -slim suffix added for pre-v3.24
shell: bash
run: |
./setup-lando.sh --version=${{ matrix.version }} --debug 2>&1 | tee setup-output.log
if ! grep -q "disabled autosetup" setup-output.log; then
echo "::error::BUG: Setup was NOT disabled for pre-v3.24"
if ! grep -q "autoslimin url" setup-output.log; then
echo "::error::BUG: -slim suffix NOT added for pre-v3.24"
exit 1
fi
- name: Verify lando installed
Expand Down
4 changes: 2 additions & 2 deletions setup-lando.sh
Original file line number Diff line number Diff line change
Expand Up @@ -594,10 +594,10 @@ else
fi

# fatty slim
SLIM_SETUPY=$(version_compare "3.23.0" "$SVERSION" && echo '1' || echo '0')
SLIM_SETUPY=$(version_compare "$SVERSION" "3.24" && echo '1' || echo '0')

# autoslim all v3 urls by default
if [[ $URL != file://* ]] && [[ -z "${VERSION_DEV-}" ]] && [[ $FAT != '1' ]] && [[ $SLIM_SETUPY == '1' ]]; then
if [[ $URL != file://* ]] && [[ -z "${VERSION_DEV-}" ]] && [[ $FAT != '1' ]] && [[ $SLIM_SETUPY == '0' ]]; then
URL="${URL}-slim"
HRV="$VERSION-slim"
debug "autoslimin url for lando 3 to $URL"
Expand Down
Loading