Skip to content

First stab at docker desktop tests. #6

First stab at docker desktop tests.

First stab at docker desktop tests. #6

name: Docker Desktop Tests
on:
pull_request:
jobs:
setup-lando-dd-tests:
runs-on: ${{ matrix.os }}
env:
term: xterm
strategy:
fail-fast: false
matrix:
lando-version:
# - '3.14.0'
- '3-dev'
# - 'stable'
os:
- macos-13
- macos-14
- ubuntu-22.04
- windows-2022
node-version:
- '18'
steps:
- name: Checkout code
uses: actions/checkout@v3
with:
fetch-depth: 0
- name: Install node ${{ matrix.node-version }}
uses: actions/setup-node@v3
with:
node-version: ${{ matrix.node-version }}
cache: npm
- name: Install dependencies and prepare
run: |
npm clean-install --prefer-offline --frozen-lockfile
npm run prepare
- name: Uninstall Docker Desktop
shell: bash
run: |
if [ "$RUNNER_OS" == "macOS" ]; then
brew uninstall --force --ignore-dependencies docker-desktop
elif [ "$RUNNER_OS" == "Windows" ]; then
choco uninstall docker-desktop --yes
elif [ "$RUNNER_OS" == "Linux" ]; then
sudo apt-get remove docker-ce docker-ce-cli containerd.io
sudo apt-get autoremove -y
fi
- name: Test if Docker Desktop is Uninstalled
shell: bash
run: |
if [ "$RUNNER_OS" == "macOS" ]; then
if brew list --versions docker-desktop; then
echo "Docker Desktop is still installed"
exit 1
fi
elif [ "$RUNNER_OS" == "Windows" ]; then
if choco list --local-only docker-desktop; then
echo "Docker Desktop is still installed"
exit 1
fi
elif [ "$RUNNER_OS" == "Linux" ]; then
if dpkg -l | grep docker-desktop; then
echo "Docker Desktop is still installed"
exit 1
fi
fi
- name: Setup Lando version
uses: ./
with:
lando-version: ${{ matrix.lando-version }}
setup: lando setup --skip-common-plugins -y
debug: true
telemetry: false
config: |
setup.skipCommonPlugins=true
setup.plugins.@lando/core=latest
- name: Run Docker Hello World
run: |
docker run hello-world