Skip to content

Local macOS VM E2E testing environment with Tart #27

@kryota-dev

Description

@kryota-dev

Summary

Set up a local E2E testing environment using macOS VMs to validate dotfiles configurations that cannot be tested in the current GitHub Actions CI (GUI apps, macOS defaults, fonts, etc.).

Background

The current CI (setup-validation.yml) explicitly excludes 7 scripts/features due to CI environment limitations:

  • run_once_before_00 — Prerequisites (Xcode CLI, Homebrew)
  • run_onchange_before_10 — brew bundle (cask/mas excluded)
  • run_once_after_11 — 1Password validation
  • run_onchange_after_20 — macOS defaults
  • run_once_after_30 — Font installation
  • run_once_after_90 — Interactive app downloads
  • 46 cask apps in Brewfile

A local macOS VM environment enables testing these in a clean, reproducible macOS instance.

Solution

Use Tart (cirruslabs/tart) — a CLI-first macOS VM tool built on Apple's Virtualization.framework — with Packer for IaC-managed VM images.

Key capabilities

  • Free for personal use (Fair Source License)
  • CLI-driven lifecycle: tart clonerunipstopdelete
  • Packer plugin for reproducible base image builds
  • Pre-built vanilla macOS images on ghcr.io (SSH + admin user ready)
  • Host directory sharing via --dir flag or rsync over SSH
  • GUI mode for visual verification (tart run shows macOS desktop)

Acceptance Criteria

  • make e2e runs a full dotfiles E2E test in a clean macOS VM
  • macOS defaults, cask apps, fonts, and file deployment are verified automatically

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions