diff --git a/.github/workflows/Xcode_build_test.yml b/.github/workflows/Xcode_build_test.yml index 36ba5ba..4d027c8 100644 --- a/.github/workflows/Xcode_build_test.yml +++ b/.github/workflows/Xcode_build_test.yml @@ -10,31 +10,73 @@ on: types: [assigned, labeled, opened, synchronize, reopened] jobs: - build-and-test: + prepare-matrix: runs-on: macos-13 env: working-directory: ./iOS - strategy: - matrix: - package: [MSCoreKit, MSFoundation, MSUIKit] + outputs: + matrix: ${{ steps.set-matrix.outputs.matrix }} steps: - name: Checkout uses: actions/checkout@v3 - - name: Xcode Setup + - name: Setup Xcode + if: ${{ !env.ACT }} + uses: maxim-lobanov/setup-xcode@v1 + with: + xcode-version: latest + + - name: Generate matrix + id: set-matrix + run: | + matrix="{\"include\":[" + first_entry=true + for package in MSCoreKit MSFoundation MSUIKit; do + cd $package + for scheme in $(xcodebuild -list | grep -E '^[[:space:]]*Schemes:' -A 10 | tail -n +2 | grep -v '^$'); do + if [[ $scheme != *"-Package" ]]; then + if [ "$first_entry" = true ]; then + first_entry=false + else + matrix+="," + fi + matrix+="{\"package\":\"$package\", \"scheme\":\"$scheme\"}" + fi + done + cd .. + done + matrix+="]}" + echo "::set-output name=matrix:: $matrix" + + build-and-test: + needs: prepare-matrix + runs-on: macos-13 + strategy: + fail-fast: false + matrix: ${{fromJson(needs.prepare-matrix.outputs.matrix)}} + steps: + - name: Checkout + uses: actions/checkout@v3 + + - name: Setup Xcode + if: ${{ !env.ACT }} uses: maxim-lobanov/setup-xcode@v1 with: xcode-version: latest - - name: Build ${{ matrix.package }} - run: xcodebuild \ - -scheme ${{ matrix.package }} \ - -sdk iphonesimulator \ - -destination 'platform=iOS Simulator,name=iPhone 15' \ - build + - name: 🛠️ Build ${{ matrix.scheme }} + if: ${{ !contains(matrix.scheme, 'Tests') }} + run: | + echo "🛠️ Building ${{ matrix.package }} - Scheme: ${{ matrix.scheme }}" + xcodebuild \ + -scheme ${{ matrix.scheme }} \ + -destination 'platform=iOS Simulator,name=iPhone 15 Pro' \ + clean build - - name: Test ${{ matrix.package }} - run: xcodebuild test \ - -scheme ${{ matrix.package }} \ - -sdk iphonesimulator \ - -destination 'platform=iOS Simulator,name=iPhone 15,OS=17.0' + - name: 🧪 Test ${{ matrix.scheme }} + if: ${{ contains(matrix.scheme, 'Tests') }} + run: | + echo "🧪 Testing ${{ matrix.package }} - Scheme: ${{ matrix.scheme }}" + xcodebuild clean test \ + -scheme ${{ matrix.scheme }} \ + -destination 'platform=iOS Simulator,name=iPhone 14 Pro' diff --git a/iOS/MSCoreKit/.swiftpm/xcode/xcshareddata/xcschemes/MSCacheStorage.xcscheme b/iOS/MSCoreKit/.swiftpm/xcode/xcshareddata/xcschemes/MSCacheStorage.xcscheme new file mode 100644 index 0000000..1113d29 --- /dev/null +++ b/iOS/MSCoreKit/.swiftpm/xcode/xcshareddata/xcschemes/MSCacheStorage.xcscheme @@ -0,0 +1,66 @@ + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/iOS/MSCoreKit/.swiftpm/xcode/xcshareddata/xcschemes/MSCacheStorageTests.xcscheme b/iOS/MSCoreKit/.swiftpm/xcode/xcshareddata/xcschemes/MSCacheStorageTests.xcscheme new file mode 100644 index 0000000..326b091 --- /dev/null +++ b/iOS/MSCoreKit/.swiftpm/xcode/xcshareddata/xcschemes/MSCacheStorageTests.xcscheme @@ -0,0 +1,53 @@ + + + + + + + + + + + + + + + + + + + + + diff --git a/iOS/MSFoundation/.swiftpm/xcode/xcshareddata/xcschemes/MSFoundation.xcscheme b/iOS/MSCoreKit/.swiftpm/xcode/xcshareddata/xcschemes/MSFetcher.xcscheme similarity index 88% rename from iOS/MSFoundation/.swiftpm/xcode/xcshareddata/xcschemes/MSFoundation.xcscheme rename to iOS/MSCoreKit/.swiftpm/xcode/xcshareddata/xcschemes/MSFetcher.xcscheme index b683dc0..1e30232 100644 --- a/iOS/MSFoundation/.swiftpm/xcode/xcshareddata/xcschemes/MSFoundation.xcscheme +++ b/iOS/MSCoreKit/.swiftpm/xcode/xcshareddata/xcschemes/MSFetcher.xcscheme @@ -14,9 +14,9 @@ buildForAnalyzing = "YES"> @@ -49,9 +49,9 @@ diff --git a/iOS/MSCoreKit/.swiftpm/xcode/xcshareddata/xcschemes/MSFetcherTests.xcscheme b/iOS/MSCoreKit/.swiftpm/xcode/xcshareddata/xcschemes/MSFetcherTests.xcscheme new file mode 100644 index 0000000..f299dc2 --- /dev/null +++ b/iOS/MSCoreKit/.swiftpm/xcode/xcshareddata/xcschemes/MSFetcherTests.xcscheme @@ -0,0 +1,53 @@ + + + + + + + + + + + + + + + + + + + + + diff --git a/iOS/MSCoreKit/.swiftpm/xcode/xcshareddata/xcschemes/MSNetworking.xcscheme b/iOS/MSCoreKit/.swiftpm/xcode/xcshareddata/xcschemes/MSNetworking.xcscheme new file mode 100644 index 0000000..f6fba4e --- /dev/null +++ b/iOS/MSCoreKit/.swiftpm/xcode/xcshareddata/xcschemes/MSNetworking.xcscheme @@ -0,0 +1,66 @@ + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/iOS/MSCoreKit/.swiftpm/xcode/xcshareddata/xcschemes/MSNetworkingTests.xcscheme b/iOS/MSCoreKit/.swiftpm/xcode/xcshareddata/xcschemes/MSNetworkingTests.xcscheme new file mode 100644 index 0000000..5e9ef94 --- /dev/null +++ b/iOS/MSCoreKit/.swiftpm/xcode/xcshareddata/xcschemes/MSNetworkingTests.xcscheme @@ -0,0 +1,53 @@ + + + + + + + + + + + + + + + + + + + + + diff --git a/iOS/MSCoreKit/.swiftpm/xcode/xcshareddata/xcschemes/MSPersistentStorage.xcscheme b/iOS/MSCoreKit/.swiftpm/xcode/xcshareddata/xcschemes/MSPersistentStorage.xcscheme new file mode 100644 index 0000000..273d1d1 --- /dev/null +++ b/iOS/MSCoreKit/.swiftpm/xcode/xcshareddata/xcschemes/MSPersistentStorage.xcscheme @@ -0,0 +1,66 @@ + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/iOS/MSCoreKit/.swiftpm/xcode/xcshareddata/xcschemes/MSPersistentStorageTests.xcscheme b/iOS/MSCoreKit/.swiftpm/xcode/xcshareddata/xcschemes/MSPersistentStorageTests.xcscheme new file mode 100644 index 0000000..e9cfe80 --- /dev/null +++ b/iOS/MSCoreKit/.swiftpm/xcode/xcshareddata/xcschemes/MSPersistentStorageTests.xcscheme @@ -0,0 +1,53 @@ + + + + + + + + + + + + + + + + + + + + + diff --git a/iOS/MSFoundation/.swiftpm/xcode/xcshareddata/xcschemes/MSFoundation-Package.xcscheme b/iOS/MSFoundation/.swiftpm/xcode/xcshareddata/xcschemes/MSFoundation-Package.xcscheme deleted file mode 100644 index 38b856f..0000000 --- a/iOS/MSFoundation/.swiftpm/xcode/xcshareddata/xcschemes/MSFoundation-Package.xcscheme +++ /dev/null @@ -1,144 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/iOS/MSFoundation/.swiftpm/xcode/xcshareddata/xcschemes/MSUserDefaultsTests.xcscheme b/iOS/MSFoundation/.swiftpm/xcode/xcshareddata/xcschemes/MSUserDefaultsTests.xcscheme new file mode 100644 index 0000000..5d159c4 --- /dev/null +++ b/iOS/MSFoundation/.swiftpm/xcode/xcshareddata/xcschemes/MSUserDefaultsTests.xcscheme @@ -0,0 +1,53 @@ + + + + + + + + + + + + + + + + + + + + + diff --git a/iOS/MSFoundation/Tests/MSUserDefaultsTests/MSUserDefaultsTests.swift b/iOS/MSFoundation/Tests/MSUserDefaultsTests/MSUserDefaultsTests.swift index 757dd97..96c2c94 100644 --- a/iOS/MSFoundation/Tests/MSUserDefaultsTests/MSUserDefaultsTests.swift +++ b/iOS/MSFoundation/Tests/MSUserDefaultsTests/MSUserDefaultsTests.swift @@ -5,4 +5,9 @@ // Created by 이창준 on 11/14/23. // -import Foundation +import XCTest +import MSUserDefaults + +final class MSUserDefaultsTests: XCTestCase { + +} diff --git a/iOS/MusicSpot.xcworkspace/contents.xcworkspacedata b/iOS/MusicSpot.xcworkspace/contents.xcworkspacedata new file mode 100644 index 0000000..8cad135 --- /dev/null +++ b/iOS/MusicSpot.xcworkspace/contents.xcworkspacedata @@ -0,0 +1,22 @@ + + + + + + + + + + + + + + + diff --git a/iOS/MusicSpot.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist b/iOS/MusicSpot.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist new file mode 100644 index 0000000..18d9810 --- /dev/null +++ b/iOS/MusicSpot.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist @@ -0,0 +1,8 @@ + + + + + IDEDidComputeMac32BitWarning + + +