feat(#519): add reusable Swift CI golden-path pipeline#520
Merged
Conversation
- New golden-paths/pipelines/swift-ci.yml: macos-latest + setup-xcode, swift build on PR/push, guarded swift test (runs only when a test target exists in Package.swift), concurrency cancel-in-progress, least-privilege perms - List it in golden-paths/pipelines/README.md and the CLAUDE.md CI table - Fills the gap where all golden-path pipelines were Node/TS on ubuntu-latest; Swift/macOS adopters had no template to copy Closes #519 Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com> <!-- pre-push: skip -->
atlas-apex
commented
Jun 6, 2026
atlas-apex
left a comment
Collaborator
Author
There was a problem hiding this comment.
Code Review: PR #520
Commit: 432f2bf74921e5dcb9dbb20d7a98ae27509a6dc9
Summary
Adds the first non-Node golden-path CI template — golden-paths/pipelines/swift-ci.yml — a Swift Package Manager build gate on macos-latest with a guarded swift test step that no-ops cleanly until a test target exists. Registers it in both discovery indexes (golden-paths/pipelines/README.md and CLAUDE.md). Documentation/template contribution only — no application code, no test suite to run.
Checklist Results
- Architecture & Design: Pass — workflow is least-privilege (
permissions: contents: read), usesconcurrency+cancel-in-progresscorrectly, and the guarded-test pattern is a sound reusable idea. - Code Quality: Pass —
grep -qE '\.testTarget|testTarget\(' Package.swiftguard is correct; pinnedactions/checkout@v4andmaxim-lobanov/setup-xcode@v1. - Testing: N/A — golden-path templates are validated by actionlint (passed locally) + instantiation, not by a unit suite in this repo.
- Security: Pass — least-privilege token scope, no secrets, no untrusted input interpolation.
- Performance: Pass —
cancel-in-progressavoids piling redundant runs on the macOS runner pool. - PR Description & Glossary: Pass — five-term glossary present; Testing section concrete; ticket linked (
Closes #519). - Summary Bullet Narrative: Pass — every bullet states what changed AND why it matters; no label-only bullets.
- Technical Decisions (AgDR):N/A —
golden-paths/pipelines/is not an AgDR trigger path; rationale recorded upstream in #519. - Adopter Handbooks: N/A — only
architecture/+general/handbooks always-load; none have triggers relevant to a CI YAML + doc-table diff.migration-safety.md(blocking) does not apply (no migration files touched).
Issues Found
None.
Suggestions
- nit (non-blocking): the
pushtrigger is pinned tobranches: [main]while the README table describes it as "push to default branch". The inline comment already tells adopters to adjust formaster, so this is purely a wording nuance, not a defect. - nit (non-blocking): the PR body prose writes
setup-xcode@latest-stableas shorthand; the YAML correctly pins the action to@v1withxcode-version: latest-stable. The deliverable is correct — just flagging the prose shorthand.
Verdict
APPROVED (posted as a comment — GitHub blocks self-approval; the approval marker has been written for the merge gate.)
🤖 Reviewed by Rex (Code Reviewer Agent)
📌 Reviewed commit: 432f2bf74921e5dcb9dbb20d7a98ae27509a6dc9
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.
Summary
golden-paths/pipelines/swift-ci.yml. Until now every template undergolden-paths/pipelines/assumed Node/TypeScript (setup-node,npm ci,ubuntu-latest); a Swift/macOS adopter had nothing to copy and had to author CI from scratch. This closes that gap.Package.swiftfor a test target and runsswift testonly when one exists, else prints a skip note. So the pipeline is green on a package that has no tests yet and upgrades itself to run tests the moment a test target is added — no edit to the template needed. That makes it a safe drop-in during adoption, which is exactly when a test suite usually doesn't exist yet.macos-latest+maxim-lobanov/setup-xcode@latest-stable, least-privilegepermissions: contents: read, andconcurrencycancel-in-progress to avoid piling up redundant runs on the macOS runner pool.golden-paths/pipelines/README.md"Available Pipelines" table and the CLAUDE.md CI/CD pipelines table, so it's discoverable the same way the other pipelines are.Testing
actionlint golden-paths/pipelines/swift-ci.yml→ exit 0.python3 -c "import yaml; yaml.safe_load(...)").swift buildverified green locally on Swift 6.3.2; the guard correctly takes the skip branch when no test target is present.markdownlintclean on the two changed.mdfiles.Closes #519
Glossary
golden-paths/pipelines/that adopters copy into a project's.github/workflows/.Package.swiftmanifest (swift build/swift test).swift testonly when a test target exists, keeping the pipeline valid before any tests are written.setup-xcode(maxim-lobanov)