Skip to content
Merged
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
37 changes: 18 additions & 19 deletions .github/workflows/acceptance.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: VM Acceptance Test
name: Acceptance Test

on:
workflow_dispatch:
Expand All @@ -16,29 +16,28 @@ permissions:

jobs:
acceptance:
name: VM Acceptance
name: Acceptance
runs-on: macos-15
timeout-minutes: 30
timeout-minutes: 45
steps:
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6

- name: Cache Tart images
uses: actions/cache@668228422ae6a00e4ad889ee87cd7109ec5666a7 # v5
with:
path: ~/.tart
key: tart-sequoia-base-${{ hashFiles('scripts/vm-acceptance-test.sh') }}
restore-keys: tart-sequoia-base-

- name: Install Tart
# Pre-create ~/.secrets so setup.sh skips the interactive credential wizard.
# CI only needs a non-empty ANTHROPIC_API_KEY to satisfy the guard condition.
- name: Pre-create ~/.secrets (CI stub)
run: |
brew install cirruslabs/cli/tart

- name: Install sshpass
run: brew install hudochenkov/sshpass/sshpass

- name: Run VM acceptance test
run: bash scripts/vm-acceptance-test.sh
timeout-minutes: 25
printf 'export ANTHROPIC_API_KEY="ci-dummy"\n' > "$HOME/.secrets"
chmod 600 "$HOME/.secrets"

# Run setup.sh end-to-end on a fresh macOS runner, using the CI Brewfile
# to skip heavy GUI casks. This is functionally equivalent to a real machine
# install — the runner is a clean macOS environment on every job.
- name: Run setup.sh (CI Brewfile)
run: BREWFILE="$GITHUB_WORKSPACE/Brewfile.ci" bash setup.sh
timeout-minutes: 35

- name: Run acceptance tests
run: bash scripts/acceptance-test.sh

- name: Upload logs on failure
if: failure()
Expand Down
9 changes: 5 additions & 4 deletions scripts/acceptance-test.sh
Original file line number Diff line number Diff line change
@@ -1,9 +1,12 @@
#!/usr/bin/env bash
# Acceptance test suite. Runs INSIDE the Tart VM after setup.sh completes.
# Acceptance test suite. Run after setup.sh completes on any macOS machine.
# Works both locally and on GitHub-hosted macOS runners (no VM required).
# Collects all failures before exiting — does not short-circuit on first error.

set -euo pipefail

REPO_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")/.." && pwd)"

# Ensure Homebrew tools are on PATH — this script runs via non-login bash
# so .zprofile is never sourced.
export PATH="/opt/homebrew/bin:/opt/homebrew/sbin:$PATH"
Expand Down Expand Up @@ -43,10 +46,8 @@ check "Homebrew prefix is writable" "test -w \"\$(brew --prefix)\""

section "Homebrew"
check "brew is on PATH" "command -v brew"
check "cirruslabs/cli tap is active" "brew tap | grep -q cirruslabs/cli"
check "tart is installed" "command -v tart"
check "no deprecated formulae in Brewfile" \
"! brew bundle check --file=\"\$HOME/Repos/amcheste/mac-dev-setup/Brewfile\" 2>&1 | grep -qi deprecated"
"! brew bundle check --file=\"$REPO_DIR/Brewfile\" 2>&1 | grep -qi deprecated"

# ── Dotfiles ───────────────────────────────────────────────────────────────────

Expand Down
Loading