diff --git a/.github/workflows/iOS.yml b/.github/workflows/iOS.yml index 0b9e585..671b7dc 100644 --- a/.github/workflows/iOS.yml +++ b/.github/workflows/iOS.yml @@ -56,3 +56,24 @@ jobs: run: | pod lib lint RIBs.podspec \ --skip-tests + + spm-test: + name: SPM build & test + runs-on: macos-latest + + steps: + - name: Checkout code + uses: actions/checkout@v3 + + # The repo root resolves directly to Package.swift — the Carthage + # xcodeproj now lives under ios/ so it no longer shadows the package. + - name: Build & test Swift package on simulator + run: | + # Resolve an available iPhone simulator at runtime instead of pinning a + # model name, which rots whenever the macos-latest runner image updates. + DEVICE_ID=$(xcrun simctl list devices available --json \ + | jq -r '[.devices[][] | select(.name | test("iPhone"))] | first | .udid') + echo "Using simulator: $DEVICE_ID" + xcodebuild test \ + -scheme RIBs \ + -destination "platform=iOS Simulator,id=$DEVICE_ID" diff --git a/.travis.yml b/.travis.yml deleted file mode 100755 index ce867e8..0000000 --- a/.travis.yml +++ /dev/null @@ -1,34 +0,0 @@ -jobs: - include: - - language: objective-c - os: osx - osx_image: xcode11.2 - env: - - LC_CTYPE=en_US.UTF-8 - - LANG=en_US.UTF-8 - - IOS_VER=13.2.2 - - IOS_SDK=iphonesimulator13.2 - - SIMULATOR_NAME="iPhone 8" - - cache: - directories: - - $HOME/Carthage - - script: - - set -o pipefail - - carthage version - - carthage update --platform iOS - - cd ios - - xcodebuild -version - - xcodebuild -showsdks - - instruments -s devices - - xcodebuild -scheme "RIBs" -destination "OS=$IOS_VER,name=$SIMULATOR_NAME" -sdk "$IOS_SDK" -configuration Release clean build | xcpretty -c; - - xcodebuild -scheme "RIBs" -destination "OS=$IOS_VER,platform=iOS Simulator,name=$SIMULATOR_NAME" -sdk "$IOS_SDK" -configuration Debug clean build test | xcpretty -c; - -branches: - except: - - gh-pages - - assets - -notifications: - email: false diff --git a/Cartfile b/Cartfile index 7e913d3..afc23c2 100644 --- a/Cartfile +++ b/Cartfile @@ -1 +1 @@ -github "ReactiveX/RxSwift" ~> 6.5.0 +github "ReactiveX/RxSwift" ~> 6.9.0 diff --git a/RIBs.xcodeproj/project.pbxproj b/ios/RIBs.xcodeproj/project.pbxproj similarity index 99% rename from RIBs.xcodeproj/project.pbxproj rename to ios/RIBs.xcodeproj/project.pbxproj index e66a516..cd4a9a1 100644 --- a/RIBs.xcodeproj/project.pbxproj +++ b/ios/RIBs.xcodeproj/project.pbxproj @@ -210,7 +210,7 @@ E8E789432378AD000043E59E /* Package.swift */, 8B9882E61F86E1CF00ABE009 /* Info.plist */, ); - path = RIBs; + path = ../RIBs; sourceTree = ""; }; 8B9882EF1F86E1CF00ABE009 /* RIBsTests */ = { @@ -226,7 +226,7 @@ AF90B4121FBA18CD00920384 /* Worker */, AF90B4171FBA1F2400920384 /* Workflow */, ); - path = RIBsTests; + path = ../RIBsTests; sourceTree = ""; }; C0A1000B2B10000300A10001 /* Concurrency */ = { diff --git a/RIBs.xcodeproj/xcshareddata/xcschemes/RIBs.xcscheme b/ios/RIBs.xcodeproj/xcshareddata/xcschemes/RIBs.xcscheme similarity index 100% rename from RIBs.xcodeproj/xcshareddata/xcschemes/RIBs.xcscheme rename to ios/RIBs.xcodeproj/xcshareddata/xcschemes/RIBs.xcscheme