First stab at docker desktop tests. #11
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: 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" == "Linux" ]; then | |
sudo apt-get remove docker-ce docker-ce-cli containerd.io | |
sudo apt-get autoremove -y | |
fi | |
- name: Uninstall Docker Desktop Windows | |
if: runner.os == 'Windows' | |
shell: pwsh | |
run: | | |
$dockerInstaller = Get-Command 'Docker Desktop Installer.exe' | |
& $dockerInstaller.Source uninstall | |
- 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 docker --version; 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 |