Skip to content

Add cross-platform dev environment for local testing#77

Draft
McNultyyy wants to merge 2 commits into
mainfrom
mcnultyyy/cross-platform-dev-env
Draft

Add cross-platform dev environment for local testing#77
McNultyyy wants to merge 2 commits into
mainfrom
mcnultyyy/cross-platform-dev-env

Conversation

@McNultyyy
Copy link
Copy Markdown
Collaborator

@McNultyyy McNultyyy commented May 27, 2026

Cross-Platform Dev Environment

Adds Docker-based tooling for local cross-platform testing, enabling developers and AI agents to reproduce platform-specific CI failures without pushing to GitHub.

What's included

  • scripts/dev-env.ps1 — Unified CLI with verbs: start, stop, status, exec, test
  • docker-compose.dev.yml — Docker Compose with profiles for standalone dev, with-emulator, and emulator-only modes
  • Updated CONTRIBUTING.md — Comprehensive cross-platform testing documentation
  • Updated AGENTS.md — AI agent workflow documentation
  • Removed test-linux.ps1 — Superseded by the new tooling

The 5 Scenarios

# Command What happens
1 dev-env.ps1 test -Platform windows -Target inmemory Runs directly on host
2 dev-env.ps1 test -Platform windows -Target emulator-windows Runs on host (requires installed emulator)
3 dev-env.ps1 test -Platform windows -Target emulator-linux Starts emulator container, tests run on host
4 dev-env.ps1 test -Platform linux -Target inmemory Starts dev container, tests run inside
5 dev-env.ps1 test -Platform linux -Target emulator-linux Starts emulator + dev (shared network), tests inside

Testing performed

All scenarios tested locally:

  • ✅ Phase 1: No-Docker scenarios (1-4 basic tests)
  • ✅ Phase 2: Dev container lifecycle (start, status, exec, idempotent start, Scenario 4)
  • ✅ Phase 3: Emulator scenarios (Scenario 3, Scenario 5)
  • ✅ Phase 4: Teardown and cleanup

Key technical decisions

  • Shared network namespace (network_mode: "service:emulator") — replicates CI behavior where emulator is accessible at localhost:8081
  • Host NuGet cache mounted as fallback source — handles corporate proxy environments
  • Docker Compose profiles manage different service configurations without conflicting containers
  • Reuses existing run-tests.ps1 — no duplication of test orchestration logic

McNultyyy and others added 2 commits May 27, 2026 08:13
Introduces a unified scripts/dev-env.ps1 tool that supports all 5
platform + backend testing combinations:
- Windows + in-memory
- Windows + Windows emulator
- Windows + Linux emulator (Docker)
- Linux + in-memory (Docker)
- Linux + Linux emulator (Docker)

The script manages Docker container lifecycle (start/stop/status),
provides an exec command for arbitrary Linux commands, and a test
command that auto-starts required services before running tests.

Also adds docker-compose.dev.yml defining the dev and emulator
services, and removes the now-superseded test-linux.ps1.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
- Use network_mode: service:emulator for shared network namespace
  (replicates CI behavior where emulator is at localhost:8081)
- Add Docker Compose profiles: standalone, with-emulator, emulator-only
- Rename Start-Service to Start-DockerService to avoid PowerShell conflict
- Fix exit code leak in status command from docker inspect
- Mount host NuGet cache as fallback source for corporate proxy environments
- Remove ports 10250-10256 (unnecessary with shared network namespace)
- Only publish port 8081 for host access in emulator-only scenarios

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant