fix bug causing lando setup fail on POSIX for lando <3.24 #194
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: POSIX Script Replacer Tests | |
on: | |
pull_request: | |
jobs: | |
setup-lando-posix-replacer-test: | |
runs-on: ${{ matrix.runner }} | |
env: | |
LANDO_GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
strategy: | |
fail-fast: false | |
matrix: | |
include: | |
- old-version: v3.23.1 | |
os: macos | |
arch: arm64 | |
runner: macos-14 | |
version: v3.23.11 | |
- old-version: v3.23.1 | |
os: linux | |
arch: x64 | |
runner: ubuntu-24.04 | |
version: v3.23.11 | |
- old-version: v3.23.1 | |
os: linux | |
arch: x64 | |
runner: ubuntu-24.04 | |
version: 3-edge | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v4 | |
with: | |
fetch-depth: 0 | |
- name: Add tempbin to PATH | |
run: echo "PATH=$HOME/.lando/bin:$PATH" >> $GITHUB_ENV | |
- name: Get older Lando version ${{ matrix.old-version }} | |
shell: bash | |
run: | | |
mkdir -p "$RUNNER_TEMP/bin" ~/.lando/bin | |
curl \ | |
--fail \ | |
--location \ | |
--progress-bar \ | |
--output "$RUNNER_TEMP/bin/lando" \ | |
"https://github.com/lando/core/releases/download/${{ matrix.old-version }}/lando-${{ matrix.os }}-${{ matrix.arch }}-${{ matrix.old-version }}-slim" | |
chmod +x "$RUNNER_TEMP/bin/lando" | |
ln -sf "$RUNNER_TEMP/bin/lando" "$HOME/.lando/bin/lando" | |
lando plugin-add @lando/core@${{ matrix.old-version }} | |
lando shellenv --add | |
- name: Verify older situation | |
shell: bash | |
run: | | |
which lando | grep "$HOME/.lando/bin/lando" | |
readlink -f $(which lando) | grep "$RUNNER_TEMP/bin/lando" | |
lando version | grep ${{ matrix.old-version }} | |
- name: Replace Lando with setup-script | |
shell: bash | |
run: ./setup-lando.sh --version="${{ matrix.version }}" --no-setup | |
- name: Verify new situation | |
shell: bash | |
run: | | |
which lando | grep "$HOME/.lando/bin/lando" | |
readlink -f $(which lando) | grep -E "^$HOME/\.data/lando/[^/]+/lando$" | |
lando version | grep ${{ matrix.old-version }} || echo $? | grep 1 && lando version |