Tests / test (push) Failing after 41s
Adds a Gitea Actions workflow running swift test in a swift:6.2 container. The kit did not build without Apple frameworks, so the two files that need them are wrapped in #if canImport, and the SwiftUI app target is added to Package.swift only on macOS. Neither can exist in a Linux container. This costs no coverage: all 43 tests are about file format and none touch the Contacts or EventKit readers. The integration those readers represent remains verifiable only on a Mac. Co-Authored-By: Claude Opus 5 <[email protected]> Claude-Session: https://claude.ai/code/session_01C5X1tYo9oxAfvoiFMh1QQr
30 lines
766 B
Swift
30 lines
766 B
Swift
// swift-tools-version: 6.2
|
|
import PackageDescription
|
|
|
|
// The kit and its tests are Foundation-only and build anywhere. The app target
|
|
// is SwiftUI driving Contacts and EventKit, none of which exist on Linux, so it
|
|
// is added only on macOS — otherwise `swift test` in a Linux container would
|
|
// fail trying to build an executable it can never link.
|
|
var targets: [Target] = [
|
|
.target(name: "IPodSyncKit"),
|
|
.testTarget(
|
|
name: "IPodSyncKitTests",
|
|
dependencies: ["IPodSyncKit"]
|
|
),
|
|
]
|
|
|
|
#if os(macOS)
|
|
targets.append(
|
|
.executableTarget(
|
|
name: "iPodSyncApp",
|
|
dependencies: ["IPodSyncKit"]
|
|
)
|
|
)
|
|
#endif
|
|
|
|
let package = Package(
|
|
name: "iPodContactsAndCalendarSync",
|
|
platforms: [.macOS(.v14)],
|
|
targets: targets
|
|
)
|