Repository navigation
ci: add WSL2 GitHub Actions testing workflow, for #6444 - #8151
Merged
Merged
Conversation
Adds a workflow_dispatch-only workflow to run DDEV tests inside WSL2 on windows-2025 GitHub Actions runners with Docker CE (native inside WSL2), replacing the Buildkite wsl2-docker-inside pipeline. - test-wsl2.yml: orchestrates WSL2 install, setup, clone, and test - wsl2-setup.sh: installs Docker CE, Go, build deps, creates testuser - wsl2-test.sh: builds DDEV and runs make test inside WSL2 Uses GOTEST_SHORT=16 (drupal11 only) to match Buildkite behavior. NAT networking mode only; mirrored mode to be added later. Co-Authored-By: Claude Opus 4.6 <[email protected]>
Add mariadb-client, expect, libcurl4-gnutls-dev, and cloudflared to match the packages installed by linux-setup.sh for other test workflows. Co-Authored-By: Claude Opus 4.6 <[email protected]>
rfay
added a commit
to rfay/ddev
that referenced
this pull request
Feb 18, 2026
…ection ## The Issue - For ddev#8151 PR ddev#8151 added WSL2 testing but builds from forked PRs get incorrect version numbers (e.g., v1.23.5-846-gbaeb0de45 instead of v1.25.0-xxx). This causes addon-get tests to fail on version constraint checks because the fork's remote may not have current upstream tags synced. ## How This PR Solves The Issue The workflow clones from the fork (for PRs) but only fetches tags from that fork's remote. Since forks may not have current upstream tags synced, `git describe` finds old tags like v1.23.5 instead of v1.25.0. **Changes:** - Add upstream (ddev/ddev) as a git remote after cloning - Fetch tags from upstream instead of (or in addition to) origin - This matches the behavior of `actions/checkout@v5` with `fetch-depth: 0` used in other workflows The clone command now: 1. Clones from fork (preserving PR source) 2. Adds upstream remote (github.repository = ddev/ddev) 3. Fetches tags from upstream (git fetch upstream --tags) 4. git describe now finds correct version tags ## Manual Testing Instructions 1. Create a PR from a fork that doesn't have latest tags synced 2. Trigger the WSL2 workflow 3. Verify the "Clone repository for testuser" step shows correct version 4. Verify addon-get tests pass with proper version detection ## Automated Testing Overview This fix will be validated by the WSL2 workflow itself. The workflow should now correctly detect version as v1.25.0-based instead of v1.23.5-based. ## Release/Deployment Notes - No impact on released artifacts - Fixes CI testing for PRs from forks Co-Authored-By: Claude Sonnet 4.5 <[email protected]>
rfay
added a commit
that referenced
this pull request
Feb 18, 2026
…ection, for #8151 (#8153) [skip buildkite] Co-authored-by: Claude Sonnet 4.5 <[email protected]>
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The Issue
DDEV's WSL2 integration tests currently run on self-hosted Buildkite agents (physical Windows machines). This PR adds a GitHub Actions workflow to run WSL2 tests with Docker CE on GitHub-hosted runners, reducing dependence on personal hardware infrastructure.
How This PR Solves The Issue
Because workflows like this can't run until on default branch (main), this PR can't be tested, but it's running fine in ddev-test/ddev, https://github.com/ddev-test/ddev/actions/runs/22104960219/job/63884886552
Adds three files:
.github/workflows/test-wsl2.yml-- Standalone workflow (not usingtest-reusable.yml, which is Linux-specific). Runs onwindows-2025withworkflow_dispatchtrigger for iterating until stable. Installs a WSL2 Ubuntu distro namedDDEV, creates atestuser, enables systemd, clones the repo inside WSL2's native filesystem for performance, and runsmake test..github/workflows/wsl2-setup.sh-- Runs as root inside WSL2. Installs Docker CE, Go, build dependencies (aligned withlinux-setup.sh), mkcert, ngrok, and cloudflared. Configurestestuserwith docker group access and passwordless sudo..github/workflows/wsl2-test.sh-- Runs astestuserinside WSL2. Mirrors the test pattern fromtest-reusable.yml:maketo build, thenmake testwith configurableTESTARGS,GOTEST_SHORT, etc.Key design decisions:
~/workspace/ddev), not on/mnt/c/..., for performancewsl -- bash -exc "..."pattern (multi-line heredocs fail due to PowerShell CRLF injection and argument splitting)GOTEST_SHORT=16(Drupal11 only) to match existing Buildkite behavior and keep runtime manageable/etc/wsl.confwith awsl --shutdowncycle to applyKnown limitations
Mirrored networking: The matrix includes mirrored mode infrastructure (the
.wslconfigstep, the matrix definition) but it is commented out. Windows Server 2025 does not support WSL2 mirrored networking (microsoft/WSL#11154). Options for future mirrored mode testing are discussed in #6444.Windows ARM64 runners (
windows-11-arm): WSL2 does not work on these runners -- thewsl --installcommand fails. These runners are consumer Windows 11 on ARM64, which would theoretically support mirrored networking, but WSL2 itself is non-functional there.tmate on Windows ARM64: If ARM64 runners are used in the future, tmate requires the
msys2/setup-msys2@v2workaround (see action-tmate#216):Manual Testing Instructions
GOTEST_SHORT,TESTARGS, ormake_targetAutomated Testing Overview
This PR is itself a CI workflow. It will be validated by running it via
workflow_dispatchand confirming test results match existing Buildkite WSL2 runs.Release/Deployment Notes