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
This commit is contained in:
@@ -1,3 +1,6 @@
|
||||
// EventKit has no Linux equivalent. See the note in ContactsReader.swift.
|
||||
#if canImport(EventKit)
|
||||
|
||||
import EventKit
|
||||
import Foundation
|
||||
|
||||
@@ -125,3 +128,5 @@ public actor CalendarReader {
|
||||
return "\(String(safe).prefix(64))-\(stamp)@ipod-sync"
|
||||
}
|
||||
}
|
||||
|
||||
#endif
|
||||
|
||||
@@ -1,3 +1,8 @@
|
||||
// Contacts has no Linux equivalent. Guarding the whole file lets the kit
|
||||
// build in a Linux container so the format logic can be tested there;
|
||||
// nothing in this file is exercised by the test suite.
|
||||
#if canImport(Contacts)
|
||||
|
||||
import Contacts
|
||||
import Foundation
|
||||
|
||||
@@ -131,3 +136,5 @@ public actor ContactsReader {
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
#endif
|
||||
|
||||
Reference in New Issue
Block a user