Skip to content

Optimize agent worktree creation #44

Optimize agent worktree creation

Optimize agent worktree creation #44

Workflow file for this run

name: Tests
on:
pull_request:
push:
branches: [main]
# Cancel superseded runs on the same ref.
concurrency:
group: tests-${{ github.ref }}
cancel-in-progress: true
jobs:
test:
runs-on: macos-14
timeout-minutes: 20
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Setup Xcode
uses: maxim-lobanov/setup-xcode@v1
with:
xcode-version: latest-stable
# Caches resolved SwiftPM dependencies (clones/resolution). The package
# builds themselves are fast.
- name: Cache SwiftPM
uses: actions/cache@v4
with:
path: ~/Library/Caches/org.swift.swiftpm
key: ${{ runner.os }}-spm-${{ hashFiles('**/Package.resolved') }}
restore-keys: |
${{ runner.os }}-spm-
# Gate on the fast, stable `swift test` module packages only.
#
# The AgentHubCore suite is intentionally NOT run in CI: it costs ~20 min
# just to compile, has a flaky timing tail on slow runners, and the runner's
# Xcode (16.2, capped by macOS 14) differs from local dev (newer beta), so
# its CI results diverge from what developers see. It runs LOCALLY instead —
# agents run the targeted tests for any code they change (see CLAUDE.md /
# AGENTS.md), and `./scripts/test.sh` (or `/test`) runs the full suite on
# demand where it's fast and matches the dev toolchain.
#
# To make AgentHubCore CI-worthy and gate on it, harden the timing tests
# (injectable clocks / deterministic awaits) — see TestQuarantine.md / #380.
- name: Run package tests
run: bash scripts/test.sh packages