mirror of
https://github.com/openclaw/openclaw.git
synced 2026-08-12 21:53:00 -06:00
test(apple): isolate OpenClawKit CI builds (#110088)
This commit is contained in:
committed by
GitHub
parent
198e3b37b2
commit
4ef86b149d
@@ -2935,7 +2935,14 @@ jobs:
|
||||
swift build --package-path apps/shared/OpenClawKit --target OpenClawKit --disable-default-traits
|
||||
|
||||
- name: OpenClawKit tests
|
||||
run: swift test --package-path apps/shared/OpenClawKit --parallel
|
||||
run: |
|
||||
set -euo pipefail
|
||||
openclawkit_scratch="$(mktemp -d "$RUNNER_TEMP/openclawkit.XXXXXX")"
|
||||
trap 'rm -rf "$openclawkit_scratch"' EXIT
|
||||
swift test \
|
||||
--package-path apps/shared/OpenClawKit \
|
||||
--scratch-path "$openclawkit_scratch" \
|
||||
--parallel
|
||||
|
||||
- name: Swift test
|
||||
run: |
|
||||
|
||||
@@ -56,10 +56,10 @@ struct GatewayErrorsTests {
|
||||
|
||||
let problem = try #require(GatewayConnectionProblemMapper.map(error: error))
|
||||
|
||||
#expect(problem.titlePresentation == .localized("This device is not approved yet"))
|
||||
#expect(problem.messagePresentation == .localized(
|
||||
"The gateway received the connection request, but this device must be approved first."))
|
||||
#expect(problem.actionLabelPresentation == .localized("Approve on gateway"))
|
||||
#expect(problem.titlePresentation.localizationKey == "This device is not approved yet")
|
||||
#expect(problem.messagePresentation
|
||||
.localizationKey == "The gateway received the connection request, but this device must be approved first.")
|
||||
#expect(problem.actionLabelPresentation?.localizationKey == "Approve on gateway")
|
||||
}
|
||||
|
||||
@Test func `gateway supplied copy remains verbatim`() throws {
|
||||
@@ -282,3 +282,10 @@ struct GatewayErrorsTests {
|
||||
#expect(problem?.canTrustRotatedCertificate == false)
|
||||
}
|
||||
}
|
||||
|
||||
extension GatewayConnectionProblem.PresentationText {
|
||||
fileprivate var localizationKey: String? {
|
||||
guard case let .localized(key) = self else { return nil }
|
||||
return key
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
import Foundation
|
||||
@testable import OpenClawKit
|
||||
import Testing
|
||||
@testable import OpenClawKit
|
||||
|
||||
struct WatchCommandsTests {
|
||||
@Test func `app snapshot dual writes semantic and legacy status fields`() throws {
|
||||
@@ -22,6 +22,7 @@ struct WatchCommandsTests {
|
||||
let encoded = try JSONEncoder().encode(message)
|
||||
let object = try #require(JSONSerialization.jsonObject(with: encoded) as? [String: Any])
|
||||
|
||||
#expect(object["type"] as? String == "watch.app.snapshot")
|
||||
#expect(object["gatewayStatus"] != nil)
|
||||
#expect(object["gatewayStatusText"] as? String == "Connected")
|
||||
#expect(object["talkStatus"] != nil)
|
||||
|
||||
+1
-1
@@ -46,7 +46,7 @@ dispatch.
|
||||
| `skills-python` | Ruff + pytest for Python-backed skills | Python-skill-relevant changes |
|
||||
| `checks-windows` | Windows-specific process/path tests plus shared runtime import specifier regressions | Windows-relevant changes |
|
||||
| `macos-node` | Focused macOS TypeScript tests: launchd, Homebrew, runtime paths, packaging scripts, process-group wrapper | macOS-relevant changes |
|
||||
| `macos-swift` | Swift lint, build, and tests for the macOS app | macOS-relevant changes |
|
||||
| `macos-swift` | Swift lint and build for the macOS app, plus tests for the app and shared OpenClawKit package | macOS-relevant changes |
|
||||
| `ios-build` | Xcode project generation plus the iOS app simulator build | iOS app, shared app kit, or Swabble changes |
|
||||
| `android` | Android unit tests for both flavors plus one debug APK build | Android-relevant changes |
|
||||
| `openclaw/ci-gate` | Final aggregate: requires admission, preflight, and security; accepts skips only for manifest-disabled downstream lanes | Every non-draft CI run |
|
||||
|
||||
Reference in New Issue
Block a user