Skip to content

test: get the test suite running again + move CI to GitHub Actions#296

Merged
MarshallOfSound merged 4 commits into
mainfrom
sam/its-2026
May 2, 2026
Merged

test: get the test suite running again + move CI to GitHub Actions#296
MarshallOfSound merged 4 commits into
mainfrom
sam/its-2026

Conversation

@MarshallOfSound
Copy link
Copy Markdown
Collaborator

The test suite hasn't built in years (Swift 3, Quick 1.x, Xcode 9-era deps). This gets it green on modern Xcode without touching anything in Squirrel/.

Dependency / toolchain bumps

  • Quick 1.1.05.0.1, Nimble 6.1.09.2.1 — last versions that keep the ObjC QuickSpecBegin/End DSL working (ref: Update test dependencies for Xcode 15+ compatibility #295)
  • SWIFT_VERSION 3.05.0
  • MACOSX_DEPLOYMENT_TARGET10.13 (libarclite no longer ships for 10.8/10.9)
  • GCC_TREAT_WARNINGS_AS_ERRORS = NO at the project level — vendored ReactiveCocoa 2.x trips -Wimplicit-const-int-float-conversion on modern clang

Test fixtures

  • TestApplication now ad-hoc signs instead of requiring the GitHub C4RRYD56A6 team cert
  • New script/sign-test-fixtures build phase regenerates TestApplication 2.1.app + TestApplication.app.zip from the freshly-built TestApplication and signs both with an explicit designated requirement so SQRLCodeSignature cross-validates on any host

Spec updates

  • QuickSpec+SQRLFixtures: ConfigurationQCKConfiguration, qck_beforeSuite, before/afterEachWithMetadata: (Quick 5 ObjC API)
  • SQRLDirectoryManagerSpec: derive expected identifier from the host bundle (xctest has its own bundle id now)
  • SQRLUpdaterSpec: write update zips to a per-test temp dir (NSItemReplacementDirectory is sandboxed away from the launched TestApplication on modern macOS), fix env-var typing for NSWorkspace, swizzle isRunningOnReadOnlyVolume under the xctest CLI host, xit the prune-after-update test (behavior intentionally removed in 7dffc4b / Downloaded updates are pruned by subsequent update checks #174)
  • Disabled the manual SQUIRREL_TEST_LOCAL_SERVER / _CDN scheme env vars by default — they swizzle updateFromJSONData: and never restore it

CI

  • New .github/workflows/ci.yml: checkout w/ recursive submodules → build → script/test, piped through xcbeautify
  • Dropped .travis.yml, script/certs.p12, and the keychain import from script/cibuild

Result

56 tests, 0 failures.

Note

The xcodebuild path here still links against ReactiveCocoa 2.5 / Mantle 1.5, not the ReactiveObjC / Mantle 2.2 that Electron actually builds via GN + patches. Aligning those is a separate (larger) job.

- Bump Quick to v5.0.1 and Nimble to v9.2.1 (last versions with full
  Objective-C QuickSpec DSL compatibility)
- SWIFT_VERSION 3.0 -> 5.0
- Disable -Werror at the project level so vendored ReactiveCocoa 2.x
  builds against modern clang
- Bump deployment target to 10.13 (libarclite no longer ships for older)
- TestApplication: ad-hoc sign instead of requiring the GitHub team cert
- Regenerate signed test fixtures at build time so SQRLCodeSignature
  cross-validates regardless of host machine
- Update specs for Quick 5 ObjC API (QCKConfiguration, qck_beforeSuite,
  before/afterEachWithMetadata:)
- SQRLUpdaterSpec: write update zips to per-test temp dir, swizzle
  isRunningOnReadOnlyVolume under xctest CLI host, fix env-var typing
  for NSWorkspace, xit prune-after-update test (behavior intentionally
  removed in 7dffc4b)
- SQRLDirectoryManagerSpec: derive expected identifier from main bundle
- Disable manual local-server scheme env vars by default
- Add script/test wrapper
Travis only ever built the framework; the new workflow builds and runs
the test suite on macos-latest. xcbeautify is preinstalled on the
runner image.
TestApplication is ad-hoc signed now, so the encrypted GitHub team
certificate and the keychain import dance are dead code.
The vendored xcconfigs (0.8.1, circa 2015) set VALID_ARCHS=x86_64 in
Mac-Base.xcconfig, so all Squirrel targets were x86_64-only while
Quick/Nimble built for the host arch. On arm64 runners this meant
implicit dependency detection couldn't match Nimble.framework and the
test target failed with 'no such module'.

- VALID_ARCHS = arm64 x86_64 at the project level and on the CLI
- ONLY_ACTIVE_ARCH=YES + explicit -destination so everything builds
  for the host arch
- Quick-macOS / Nimble-macOS added as explicit scheme buildables
  (buildForTesting only) so they're always in the dependency graph
- parallelizeBuildables=NO so the Swift-generated headers exist before
  SquirrelTests starts dependency-scanning
@MarshallOfSound MarshallOfSound merged commit 6fe7bbd into main May 2, 2026
1 check passed
@MarshallOfSound MarshallOfSound deleted the sam/its-2026 branch May 2, 2026 22:06
MarshallOfSound added a commit that referenced this pull request May 2, 2026
Stacked on #296.

These two specs were already in the suite but only ran their bodies when
`SQUIRREL_TEST_LOCAL_SERVER` / `SQUIRREL_TEST_LOCAL_CDN` were set — and
#296 disabled those env vars in the scheme because the swizzled
`updateFromJSONData:` was never restored, which broke later in-process
specs.

This makes them safe to run unconditionally:
- Swizzle + OHHTTPStubs registration moved into `beforeEach`, original
`IMP`s captured and restored via `addCleanupBlock`
- Stub now returns `[RACSignal empty]` instead of `nil` so the command
chain completes cleanly
- Scheme env vars flipped back to `isEnabled="YES"`

56 tests, 0 failures, both specs now actually exercise the HTTP path.
MarshallOfSound added a commit that referenced this pull request May 2, 2026
Warnings-as-errors was disabled in #296 to let vendored ReactiveCocoa
build under modern clang. Now that the Mantle 2 / ReactiveObjC migration
is done, restore it for our own code.

The CLI override (GCC_TREAT_WARNINGS_AS_ERRORS=NO) has to stay so the
vendor projects in the workspace still build, and CLI overrides win over
target-level settings, so re-introduce -Werror via OTHER_CFLAGS at the
project level instead. That setting isn't touched by the CLI and only
applies to targets in this project.

Warning fixes:

- SQRLShipItRequest, SQRLUpdaterSpec: migrate to
  +[MTLJSONAdapter JSONDictionaryFromModel:error:]
- SQRLUpdate: migrate to
  +[MTLValueTransformer transformerUsingForwardBlock:reverseBlock:]
  with the new (value, success, error) block signature
- SQRLDownloadedUpdate: drop dead +JSONKeyPathsByPropertyKey (the class
  is not <MTLJSONSerializing>; the NSNull entry would assert under
  Mantle 2 if it were ever reached)
- QuickSpec+SQRLFixtures: pragma around SMJobRemove in test cleanup
  (no in-process replacement; SMAppService requires same-API
  registration)

Noise suppressed:

- DISABLE_MANUAL_TARGET_ORDER_BUILD_WARNING (we set
  parallelizeBuildables=NO deliberately)
- LSApplicationCategoryType for TestApplication
MarshallOfSound added a commit that referenced this pull request May 2, 2026
Warnings-as-errors was disabled in #296 to let vendored ReactiveCocoa
build under modern clang. Now that the Mantle 2 / ReactiveObjC migration
is done, restore it for our own code.

The CLI override (GCC_TREAT_WARNINGS_AS_ERRORS=NO) has to stay so the
vendor projects in the workspace still build, and CLI overrides win over
target-level settings, so re-introduce -Werror via OTHER_CFLAGS at the
project level instead. That setting isn't touched by the CLI and only
applies to targets in this project.

Warning fixes:

- SQRLShipItRequest, SQRLUpdaterSpec: migrate to
  +[MTLJSONAdapter JSONDictionaryFromModel:error:]
- SQRLUpdate: migrate to
  +[MTLValueTransformer transformerUsingForwardBlock:reverseBlock:]
  with the new (value, success, error) block signature
- SQRLDownloadedUpdate: drop dead +JSONKeyPathsByPropertyKey (the class
  is not <MTLJSONSerializing>; the NSNull entry would assert under
  Mantle 2 if it were ever reached)
- QuickSpec+SQRLFixtures: pragma around SMJobRemove in test cleanup
  (no in-process replacement; SMAppService requires same-API
  registration)

Noise suppressed:

- DISABLE_MANUAL_TARGET_ORDER_BUILD_WARNING (we set
  parallelizeBuildables=NO deliberately)
- LSApplicationCategoryType for TestApplication
MarshallOfSound added a commit that referenced this pull request May 2, 2026
Stacked on #299.

`-Werror` was disabled project-wide in #296 to unblock the vendored
ReactiveCocoa 2.5 build. With #298 we control the warning surface again,
so turn it back on for our targets and fix what's left. **63/63 tests,
zero warnings in Squirrel-owned code.**

#### Mechanism
The CLI `GCC_TREAT_WARNINGS_AS_ERRORS=NO` override has to stay
(ReactiveObjC's `RACTestScheduler.m` still trips
`-Wimplicit-int-float-conversion`), and CLI overrides win over *all*
project/target settings. So instead of fighting that, set `OTHER_CFLAGS
= -Werror` at the Squirrel project level — CLI doesn't touch
`OTHER_CFLAGS`, and it only propagates to our five targets, not the
vendor xcodeprojs. Also flipped the project-level
`GCC_TREAT_WARNINGS_AS_ERRORS` back to `YES` for builds that bypass
`script/test`.

#### Real fixes
- `SQRLShipItRequest.m` / `SQRLUpdaterSpec.m`:
`+JSONDictionaryFromModel:` → `:error:`
- `SQRLUpdate.m`: `+reversibleTransformerWithForwardBlock:reverseBlock:`
→ `+transformerUsingForwardBlock:reverseBlock:`
- `SQRLDownloadedUpdate.m`: dropped dead `+JSONKeyPathsByPropertyKey`
returning `NSNull.null` (would assert under Mantle 2; class isn't
`<MTLJSONSerializing>`)
- `TestApplication-Info.plist`: `LSApplicationCategoryType`

#### Pragma
- `QuickSpec+SQRLFixtures.m`: `SMJobRemove` (test cleanup only;
`SMAppService` requires registering via the same API)

#### Punted
- `UTTypeConformsTo` / `launchApplicationAtURL` — neither warns at
deployment target 10.13. The replacements are 11.0+/10.15+ only, so a
real fix needs `@available` branching that keeps the deprecated path
anyway. Separate PRs (or a deployment-target bump) handle these.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant