Skip to content
Closed
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
2 changes: 1 addition & 1 deletion .github/workflows/pkg-binary.yml
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ on:

jobs:
pkg-binary:
runs-on: ${{ inputs.arch == 'arm64' && 'macos-15' || 'ubuntu-24.04' }}
runs-on: ${{ inputs.arch == 'arm64' && 'macos-26' || 'ubuntu-24.04' }}
env:
TERM: xterm
steps:
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/pr-core-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ jobs:
node-version:
- "20"
os:
# - macos-15
# - macos-26
- ubuntu-24.04
# - windows-2022
shell:
Expand Down
8 changes: 8 additions & 0 deletions .github/workflows/pr-setup-linux-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -54,10 +54,18 @@ jobs:
auto-setup: false
lando-version: ${{ steps.pkg-action.outputs.file }}
telemetry: false
- name: Get default Docker Engine version
id: docker-engine
run: |
version=$(node -p "require('./utils/get-config-defaults')({}).setup.buildEngine")
echo "version=$version" >> "$GITHUB_OUTPUT"
- name: Run Leia Tests
uses: lando/run-leia-action@v2
with:
leia-test: "./examples/${{ matrix.leia-test }}/README.md"
cleanup-header: "Destroy tests"
shell: bash
stdin: true
- name: Verify Docker Engine ${{ steps.docker-engine.outputs.version }}
if: matrix.leia-test == 'setup-linux'
run: test "$(docker version --format '{{.Server.Version}}')" = "${{ steps.docker-engine.outputs.version }}"
23 changes: 14 additions & 9 deletions .github/workflows/pr-setup-macos-tests.yml
Original file line number Diff line number Diff line change
@@ -1,10 +1,7 @@
name: Setup macOS Tests

on:
# pull_request:
push:
branches:
- SKIPFORNOW
pull_request:

jobs:
leia-tests:
Expand All @@ -14,12 +11,10 @@ jobs:
strategy:
fail-fast: false
matrix:
leia-test:
- setup-macos
node-version:
- "20"
os:
- macos-15
- macos-26

steps:
- name: Checkout code
Expand Down Expand Up @@ -56,10 +51,20 @@ jobs:
auto-setup: false
lando-version: ${{ steps.pkg-action.outputs.file }}
telemetry: false
- name: Run Leia Tests
- name: Get default Docker Desktop version
id: docker-desktop
run: |
version=$(node -p "require('./utils/get-config-defaults')({}).setup.buildEngine")
echo "version=$version" >> "$GITHUB_OUTPUT"
- name: Run lando setup tests
uses: lando/run-leia-action@v2
with:
leia-test: "./examples/${{ matrix.leia-test }}/README.md"
leia-test: "./examples/setup-macos/README.md"
cleanup-header: "Destroy tests"
shell: bash
stdin: true
- name: Verify Docker Desktop ${{ steps.docker-desktop.outputs.version }}
run: test "$(defaults read /Applications/Docker.app/Contents/Info CFBundleShortVersionString)" = "${{ steps.docker-desktop.outputs.version }}"
# GitHub-hosted macOS runners do not support the nested virtualization
# required to start Docker Desktop. The Windows setup job runs the full
# Docker Desktop smoke test after verifying the installed version.
31 changes: 27 additions & 4 deletions .github/workflows/pr-setup-windows-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,6 @@ jobs:
strategy:
fail-fast: false
matrix:
leia-test:
- setup-windows
node-version:
- "20"
os:
Expand Down Expand Up @@ -52,10 +50,35 @@ jobs:
auto-setup: false
lando-version: ${{ steps.pkg-action.outputs.file }}
telemetry: false
- name: Run Leia Tests
- name: Get default Docker Desktop version
id: docker-desktop
shell: pwsh
run: |
$version = node -p "require('./utils/get-config-defaults')({}).setup.buildEngine"
"version=$version" >> $env:GITHUB_OUTPUT
- name: Run lando setup tests
uses: lando/run-leia-action@v2
with:
leia-test: "./examples/${{ matrix.leia-test }}/README.md"
leia-test: "./examples/setup-windows/README.md"
cleanup-header: "Destroy tests"
shell: powershell
stdin: true
debug: true
- name: Verify Docker Desktop ${{ steps.docker-desktop.outputs.version }}
shell: pwsh
run: |
$actual = (Get-Item "$env:ProgramFiles\Docker\Docker\Docker Desktop.exe").VersionInfo.ProductVersion
$expected = [regex]::Escape('${{ steps.docker-desktop.outputs.version }}')
if ($actual -notmatch "^$expected(?:\.\d+)*$") {
throw "Expected Docker Desktop ${{ steps.docker-desktop.outputs.version }}, got: $actual"
}
- name: Install LAMP plugin
shell: pwsh
run: lando plugin-add "@lando/lamp@latest"
- name: Run Docker Desktop smoke tests
uses: lando/run-leia-action@v2
with:
leia-test: "./examples/desktop-smoke/README.md"
cleanup-header: "Destroy tests"
shell: powershell
stdin: true
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/pr-unit-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ jobs:
fail-fast: false
matrix:
os:
- macos-15
- macos-26
- ubuntu-24.04
- windows-2022
node-version:
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/sign-binary.yml
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ jobs:
environment: signing
runs-on: ${{
(contains(inputs.os, 'linux') || contains(inputs.file, 'linux')) && 'ubuntu-24.04' ||
(contains(inputs.os, 'macos') || contains(inputs.file, 'macos')) && 'macos-15' ||
(contains(inputs.os, 'macos') || contains(inputs.file, 'macos')) && 'macos-26' ||
(contains(inputs.os, 'win') || contains(inputs.file, 'win')) && 'windows-2022'}}
env:
TERM: xterm
Expand Down
5 changes: 5 additions & 0 deletions examples/desktop-smoke/.lando.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
name: lando-desktop-smoke
recipe: lamp

plugins:
"@lando/core": ../..
36 changes: 36 additions & 0 deletions examples/desktop-smoke/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
# Docker Desktop Smoke Tests

This example verifies a tiny LAMP application and its HTTPS proxy against the default Docker Desktop version on Windows.

## Start up tests

```bash
# Should start an app with the default Docker Desktop version
lando poweroff
lando start
```

## Verification commands

```bash
# Should discover the running application and database services
lando info --service appserver
lando info --service database

# Should execute PHP in the application service
lando php -r "echo 'lando-php-is-working';"

# Should connect PHP to the database
lando php -r '$db = new mysqli("database", "lamp", "lamp", "lamp"); exit($db->connect_errno);'

# Should serve the application through its HTTPS proxy URL
node -e "const https = require('https'); process.env.NODE_TLS_REJECT_UNAUTHORIZED = '0'; https.get('https://lando-desktop-smoke.lndo.site', response => { let body = ''; response.on('data', chunk => body += chunk); response.on('end', () => { if (response.statusCode !== 200 || !body.includes('lando-lamp-https-is-working')) process.exit(1); }); }).on('error', error => { console.error(error); process.exit(1); });"
```

## Destroy tests

```bash
# Should destroy the app and shared services
lando destroy -y
lando poweroff
```
10 changes: 10 additions & 0 deletions examples/desktop-smoke/index.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
<?php

$database = new mysqli('database', 'lamp', 'lamp', 'lamp');

if ($database->connect_errno) {
http_response_code(500);
exit('database connection failed');
}

echo 'lando-lamp-https-is-working';
7 changes: 2 additions & 5 deletions examples/setup-macos/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,8 @@ lando plugin-add "@lando/core@file:../.."
brew uninstall --force --ignore-dependencies docker-desktop
brew list --versions docker-desktop || echo $? | grep 1

# Should be able to run lando setup
lando setup -y --skip-networking --skip-common-plugins
# Should be able to run lando setup without installing the CA in CI
lando setup -y --skip-install-ca --skip-networking --skip-common-plugins

# Should have installed Docker Desktop
stat /Applications/Docker.app
Expand All @@ -28,7 +28,4 @@ find ~/.lando/bin -type f -name 'docker-compose-v2*' -exec {} version \;

# Should have created the Lando Development CA
stat ~/.lando/certs/LandoCA.crt

# Should have installed the Lando Development CA
security find-certificate -a -c "Lando Development CA" -p ~/Library/Keychains/login.keychain-db
```
Loading