ci: add CI workflow to build and test on push and PR#12
Conversation
|
Specific things to sanity-check:
|
|
Claude finished @atom2ueki's task in 1m 39s —— View job CI Workflow Review
Overall the workflow is clean and does the right thing. Three targeted answers to your questions, plus one minor flag: 1. Runner matrix — iOS
|
| # | Change | Impact |
|---|---|---|
| 1 | group: ${{ github.workflow }}-${{ github.ref }} |
Prevents future cross-workflow cancellations |
| 2 | Drop branches: [main] from pull_request |
Ensures CI on all PRs, not just those targeting main |
| 3 | Verify actions/checkout@v6 is a real stable tag |
Avoids silent breakage if tag doesn't exist |
| 4 | iOS xcodebuild job |
Defer — not worth the complexity at this stage |
There was a problem hiding this comment.
Pull request overview
Adds a GitHub Actions CI workflow to ensure the Swift package is built and its test suite runs automatically on pushes to main and on pull requests targeting main, addressing the gap noted in #11.
Changes:
- Introduces a new
CIworkflow that runsswift buildandswift test. - Runs the workflow on a macOS matrix (
macos-14,macos-15) withfail-fast: false. - Adds concurrency cancellation to avoid redundant runs on the same ref.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| on: | ||
| push: | ||
| branches: [main] | ||
| pull_request: | ||
| branches: [main] |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 822703b7ca
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| branches: [main] | ||
|
|
||
| concurrency: | ||
| group: ci-${{ github.ref }} |
There was a problem hiding this comment.
Scope concurrency group to this workflow
Using ci-${{ github.ref }} at workflow scope can cancel runs from other workflows that later reuse the same group pattern on the same ref, because GitHub Actions concurrency groups are repository-wide. In this repository, that means a future workflow (for example release/deploy on main) could unintentionally cancel CI runs or be canceled by them, leading to skipped checks; include github.workflow in the key to isolate cancellation behavior per workflow.
Useful? React with 👍 / 👎.
…vilege permissions
|
Addressed review round 1:
|
|
Claude finished @atom2ueki's task in 1m 7s —— View job Re-review — Round 2
All three round 1 items were addressed correctly. Here's the verification plus two low-priority optional suggestions. Changes verified ✅Concurrency group ( # before
group: ci-${{ github.ref }}
# after
group: ${{ github.workflow }}-${{ github.ref }}Correct. Groups are now workflow-scoped, so no future cross-workflow cancellation risk. PR trigger ( # before
pull_request:
branches: [main]
# after
pull_request:Correct. CI fires on any PR regardless of base branch. Stacked-PR footgun removed. Permissions ( permissions:
contents: readCorrect placement (top-level, before Remaining items (both optional)1. No job timeout — if jobs:
test:
timeout-minutes: 30
...Not a blocker, but worth adding before this workflow is the gate for 2. No dependency cache — each run does a cold - name: Cache Swift packages
uses: actions/cache@v4
with:
path: .build
key: ${{ runner.os }}-swift-${{ hashFiles('**/Package.resolved') }}
restore-keys: ${{ runner.os }}-swift-Place this step between Summary
The workflow is ready to merge as-is. The two optional items above are improvements worth adding in a follow-up, not hold-the-PR issues. |
|
Codex Review: Didn't find any major issues. Keep it up! ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
If Codex has suggestions, it will comment; otherwise it will react with 👍. Codex can also answer questions or update the PR. Try commenting "@codex address that feedback". |
|
Round 2 follow-up:
Will squash-merge once this final CI run goes green. |
Summary
.github/workflows/ci.ymlthat runsswift build+swift teston push tomainand on pull requests.macos-14andmacos-15withfail-fast: falseto surface per-OS regressions.Why
Closes the gap raised in #11: until now the only workflow was
claude.yml(the @claude review bot), so nothing was actually compiling the package or running the test suite when commits hitmainor PRs. That left the existing 46 tests un-enforced in CI — regressions could merge unchecked.Test plan
swift buildpasses locally (worktree, Swift 6.3.1 / macOS 26).swift testpasses locally: 46 tests, 0 failures.macos-14andmacos-15.Closes #11