Repository navigation
ci: run swift test + unsigned app compile on PRs - #129
Merged
Merged
Conversation
tarakanof
commented
Sep 26, 2026
tarakanof
left a comment
Owner
Author
There was a problem hiding this comment.
Review of #129. CI is green: changes 5s, macos 2m25s, go passed. No blockers. A few things are worth fixing before merge.
Should-fix
- The
GITHUB_ACTIONSearly exit inbuild-producers.shskips more than signing, and it keys on the wrong signal. It exits beforego build,lipo,codesign, and the LaunchAgent plist copy andplutil -lint. The comment in ci.yml says "skips itself" as if it only covers signing. Today onlyci.ymlanddocker-publish.ymlexist, and neither builds the app for release, so there is no current release impact. But a future release or notarize workflow on Actions would exit 0 and ship an app with no producer helpers and no LaunchAgents, and nothing would fail. It would also makescripts/build-producers_test.shfail if that ever runs in CI. Suggestion: gate onCODE_SIGNING_ALLOWED=NOinstead (Xcode exports build settings to script phases), and in that case skip onlycodesign, or sign ad-hoc with-. Note thatCODE_SIGN_IDENTITYis still exported as "Developer ID Application" underCODE_SIGNING_ALLOWED=NO, so falling through as-is would fail. The Go build and plist copy/lint would still run. That needsactions/setup-goin the macos job, though macos-latest ships Go anyway. This also avoids coupling CI behaviour to the CI vendor. - Pin
dorny/paths-filterto a commit SHA. The repo pins everything by major tag, but those tags belong to GitHub or Docker orgs. paths-filter is a single-maintainer third-party action, so a movedv4tag would run arbitrary code in CI. The token iscontents: readand there are no secrets in this job, so the blast radius is small, but pinning costs nothing:
uses: dorny/paths-filter@ceb8a2b8f2d89434be7ff52d3de7ec3738c5cc9d # v4.0.3(currently whatv4points to).
Add a Dependabotgithub-actionsentry if you want bumps. - The path filter misses
scripts/build-producers.sh, which is the script the Xcode post-compile phase runs. A change to it, including the new early exit itself, won't trigger the macos job. Add'scripts/**', or at leastscripts/build-producers.sh.
Nit
- The cache key is effectively frozen.
hashFiles('macos/Package.swift')never changes when sources change. After the first save, every run gets an exact hit, and actions/cache doesn't re-save on an exact hit. So the cache stays pinned to the first.buildforever, andmacos-latestwill change Xcode/Swift underneath it. SwiftPM will mostly just rebuild, but that makes the cache near-useless and a possible source of stale-module weirdness. Either include the toolchain and sources, e.g.${{ runner.os }}-${{ env.ImageVersion }}-spm-${{ hashFiles('macos/Package.swift', 'macos/Sources/**', 'macos/Tests/**') }}, or drop the cache: there are no external deps and the job takes about 2.5 min. - Wrong comment in ci.yml: "EmberKit's deployment target is macOS 26 (see macos/project.yml)". EmberKit's
Package.swiftsays.macOS(.v14). macOS 26 is the app target's deploymentTarget. - Skipped job vs required checks: nothing to fix today. The only ruleset has deletion and non_fast_forward rules and no required status checks, so a skipped
macosjob can't block merges. Ifmacosbecomes required later, a path-skipped job reports as "skipped", which GitHub counts as passing for required checks. That's fine, but note it in RUNBOOK if you add protection. - The
changesjob works on PRs with onlycontents: readbecause the repo is public, so the PR-files API is readable. If the repo ever goes private, paths-filter needspull-requests: readon that job. Consider adding it now at job level.
Verdict: fix 1–3 first. All three are small. The rest are optional.
CI only ran the Go job, so EmberKit decode breakage and app compile errors were only caught locally. Add a path-filtered macos job (swift test --package-path macos, xcodegen generate, unsigned xcodebuild) gated by a paths-filter job so it only runs for macos/**, cmd/ember/testdata/**, or workflow changes. There's no Developer ID on the runner, so build-producers.sh (the app's postCompileScripts sign phase) now skips itself under GITHUB_ACTIONS instead of failing codesign — local dev/release builds are unaffected since that env var is unset there.
- build-producers.sh no longer early-exits under GITHUB_ACTIONS; it now falls back to ad-hoc signing only when CODE_SIGNING_ALLOWED=NO or the configured identity isn't in the keychain, so go build/lipo/plist copy/plutil lint keep running and get exercised in CI. Verified this also matches the existing local (no Developer ID) fallback behavior. - macos job gets actions/setup-go (go-version-file: go.mod) since build-producers.sh now actually runs `go build` there. - Pin dorny/paths-filter to its v4.0.3 commit SHA instead of a mutable major-version tag. - Add scripts/** to the path filter (build-producers.sh lives there). - Drop the SPM build cache — EmberKit has no external dependencies, so it wasn't earning its complexity. - Fix the deployment-target comment: the Ember app target is macOS 26 (project.yml); EmberKit itself only needs macOS 14 (Package.swift). - Grant the changes job pull-requests: read so paths-filter keeps working if the repo goes private.
tarakanof
force-pushed
the
ci/128-swift-job
branch
from
September 26, 2026 09:16
aaae4a6 to
1bd3fcd
Compare
Owner
Author
|
Addressed review feedback (rebased onto latest `overhaul/ui-ng-2026-09`, force-pushed):
One rerun was needed: `swift test` failed once on `debouncedWriterRunsAfterQuietPeriod()`, a pre-existing timing-sensitive test (20ms debounce, 120ms wait) unrelated to this PR's changes — passed clean on rerun. Flagging in case it's worth widening that test's margin separately; left it untouched here since it's out of this ticket's scope. |
This was referenced Sep 26, 2026
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.
Closes #128
CI only ran the Go job, so EmberKit decode breakage (incl. the Go golden
files the Swift tests decode, added in #125) and app compile errors were
only caught locally.
What changed
changesjob (dorny/paths-filter) computes whethermacos/**,cmd/ember/testdata/**, or the workflow file itself changed.macosjob, gated on that filter,runs-on: macos-latest(currentlymacOS 26/Xcode 26 — matches
project.yml'sdeploymentTarget.macOS: "26.0"and
Package.swift'sswift-tools-version: 6.0):brew install xcodegenswift test --package-path macosxcodegen generate --spec macos/project.yml --project macosxcodebuild -project macos/Ember.xcodeproj -scheme Ember -configuration Debug CODE_SIGNING_ALLOWED=NO buildPackage.swift's hash (EmberKit has no externalSPM dependencies, so this mostly saves recompiling stdlib-ish output on
reruns of the same branch).
scripts/build-producers.sh's "Bundle & sign producer helpers" phase nowskips itself under
GITHUB_ACTIONS=trueinstead of runninggo build+codesign(there's no Developer ID on the runner, andgoisn'tguaranteed to be there either). Local dev/release builds are unaffected —
that env var is unset outside GitHub Actions.
docs/RUNBOOK.md.Test evidence
swift test --package-path macos— 239 tests pass locally.xcodegen generate --spec macos/project.yml --project macos+GITHUB_ACTIONS=true xcodebuild -project macos/Ember.xcodeproj -scheme Ember -configuration Debug CODE_SIGNING_ALLOWED=NO build— BUILD SUCCEEDED,with the sign phase printing its skip message instead of failing codesign.
GOTOOLCHAIN=go1.26.0 go fmt ./...clean,go vet ./...,go test ./... -raceall green.yamllint -d relaxed .github/workflows/ci.yml— only a pre-existingline-length warning on line 5, unrelated to this change.