diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml new file mode 100644 index 0000000..209eed0 --- /dev/null +++ b/.github/workflows/ci.yml @@ -0,0 +1,54 @@ +name: CI + +on: + pull_request: + branches: [master] + workflow_dispatch: + +jobs: + build-and-test: + runs-on: macos-latest + strategy: + matrix: + build-config: + - { + scheme: "Cache-iOS", + destination: "platform=iOS Simulator,name=iPhone 15", + sdk: "iphonesimulator", + } + - { + scheme: "Cache-tvOS", + destination: "platform=tvOS Simulator,name=Apple TV", + sdk: "appletvsimulator", + } + - { + scheme: "Cache-watchOS", + destination: "platform=watchOS Simulator,name=Apple Watch Ultra 2", + sdk: "watchsimulator", + } + - { + scheme: "Cache-macOS", + destination: "platform=generic/platform=macOS", + sdk: "macosx", + } + steps: + - uses: actions/checkout@v4 + - name: Build + run: | + xcodebuild clean build \ + -project 'Cache.xcodeproj' \ + -scheme '${{ matrix.build-config['scheme'] }}' \ + -sdk '${{ matrix.build-config['sdk'] }}' \ + -destination '${{ matrix.build-config['destination'] }}' + + - name: Execute Unit Tests + run: | + if [ "${{ matrix.build-config['scheme'] }}" == "Cache-watchOS" ]; then + exit 0; + fi + + xcodebuild test \ + -project 'Cache.xcodeproj' \ + -scheme '${{ matrix.build-config['scheme'] }}' \ + -sdk '${{ matrix.build-config['sdk'] }}' \ + -destination '${{ matrix.build-config['destination'] }}' diff --git a/Cache.podspec b/Cache.podspec index c338e03..eb95cab 100644 --- a/Cache.podspec +++ b/Cache.podspec @@ -1,7 +1,7 @@ Pod::Spec.new do |s| s.name = "Cache" s.summary = "Nothing but cache." - s.version = "7.4.0" + s.version = "7.5.0" s.homepage = "https://github.com/hyperoslo/Cache" s.license = 'MIT' s.author = { "Hyper Interaktiv AS" => "ios@hyper.no" } diff --git a/Cache.xcodeproj/xcshareddata/xcschemes/Cache-iOS-Tests.xcscheme b/Cache.xcodeproj/xcshareddata/xcschemes/Cache-iOS-Tests.xcscheme new file mode 100644 index 0000000..0b06974 --- /dev/null +++ b/Cache.xcodeproj/xcshareddata/xcschemes/Cache-iOS-Tests.xcscheme @@ -0,0 +1,54 @@ + + + + + + + + + + + + + + + + + + + + + diff --git a/Cache.xcodeproj/xcshareddata/xcschemes/Cache-macOS-Tests.xcscheme b/Cache.xcodeproj/xcshareddata/xcschemes/Cache-macOS-Tests.xcscheme new file mode 100644 index 0000000..f1fc19e --- /dev/null +++ b/Cache.xcodeproj/xcshareddata/xcschemes/Cache-macOS-Tests.xcscheme @@ -0,0 +1,54 @@ + + + + + + + + + + + + + + + + + + + + + diff --git a/Cache.xcodeproj/xcshareddata/xcschemes/Cache-tvOS-Tests.xcscheme b/Cache.xcodeproj/xcshareddata/xcschemes/Cache-tvOS-Tests.xcscheme new file mode 100644 index 0000000..1bd262d --- /dev/null +++ b/Cache.xcodeproj/xcshareddata/xcschemes/Cache-tvOS-Tests.xcscheme @@ -0,0 +1,54 @@ + + + + + + + + + + + + + + + + + + + + + diff --git a/Cache.xcodeproj/xcshareddata/xcschemes/Cache-watchOS.xcscheme b/Cache.xcodeproj/xcshareddata/xcschemes/Cache-watchOS.xcscheme new file mode 100644 index 0000000..ebce105 --- /dev/null +++ b/Cache.xcodeproj/xcshareddata/xcschemes/Cache-watchOS.xcscheme @@ -0,0 +1,67 @@ + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/Package.swift b/Package.swift index 30ce2b8..2633a5b 100644 --- a/Package.swift +++ b/Package.swift @@ -1,4 +1,4 @@ -// swift-tools-version:5.5 +// swift-tools-version:5.10 import PackageDescription diff --git a/Tests/iOS/Tests/Storage/StorageTests.swift b/Tests/iOS/Tests/Storage/StorageTests.swift index 80f3f18..f42b378 100644 --- a/Tests/iOS/Tests/Storage/StorageTests.swift +++ b/Tests/iOS/Tests/Storage/StorageTests.swift @@ -11,6 +11,7 @@ final class StorageTests: XCTestCase { storage = try! Storage( diskConfig: DiskConfig(name: "Thor"), memoryConfig: MemoryConfig(), + fileManager: FileManager.default, transformer: TransformerFactory.forCodable(ofType: User.self) ) }