diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 6948797..e33d3be 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -6,6 +6,10 @@ on: - master pull_request: +concurrency: + group: ${{ github.head_ref || github.run_id }} + cancel-in-progress: true + jobs: test: runs-on: macOS-latest @@ -18,9 +22,6 @@ jobs: - sdk: iphonesimulator destination: platform=iOS Simulator,name=iPhone 13 Pro,OS=latest - - sdk: macosx - destination: arch=x86_64 - - sdk: appletvsimulator destination: platform=tvOS Simulator,name=Apple TV,OS=latest @@ -36,21 +37,22 @@ jobs: - name: Build and Test run: | - set -o pipefail && xcodebuild clean build test \ + set -o pipefail + xcodebuild -resolvePackageDependencies + xcodebuild clean build test \ -scheme "$SCHEME" \ -sdk "$SDK" \ -destination "$DESTINATION" \ -configuration Debug \ -enableCodeCoverage YES \ + -resultBundlePath "./${{ matrix.env.sdk }}.xcresult" \ CODE_SIGN_IDENTITY="" CODE_SIGNING_REQUIRED=NO | xcpretty -c; env: SDK: ${{ matrix.env.sdk }} DESTINATION: ${{ matrix.env.destination }} - - name: Upload Code Coverage - run: | - bash <(curl -s https://codecov.io/bash) \ - -X xcodeplist \ - -J "$CODECOV_PACKAGE_NAME" - env: - CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }} + - name: Upload coverage to Codecov + uses: codecov/codecov-action@v3.1.0 + with: + xcode: true + xcode_archive_path: "./${{ matrix.env.sdk }}.xcresult" diff --git a/Sources/URLMatcher/URLConvertible.swift b/Sources/URLMatcher/URLConvertible.swift index 04daa47..ba9f49d 100644 --- a/Sources/URLMatcher/URLConvertible.swift +++ b/Sources/URLMatcher/URLConvertible.swift @@ -15,7 +15,6 @@ public protocol URLConvertible { /// Returns `queryItems` property of `URLComponents` instance. /// /// - seealso: `queryParameters` - @available(iOS 8, *) var queryItems: [URLQueryItem]? { get } } @@ -33,7 +32,6 @@ extension URLConvertible { return parameters } - @available(iOS 8, *) public var queryItems: [URLQueryItem]? { return URLComponents(string: self.urlStringValue)?.queryItems } diff --git a/Sources/URLNavigator/UIViewController+TopMostViewController.swift b/Sources/URLNavigator/UIViewController+TopMostViewController.swift index 36395eb..32f18e5 100644 --- a/Sources/URLNavigator/UIViewController+TopMostViewController.swift +++ b/Sources/URLNavigator/UIViewController+TopMostViewController.swift @@ -8,7 +8,7 @@ extension UIViewController { } /// Returns the current application's top most view controller. - open class var topMost: UIViewController? { + public class var topMost: UIViewController? { guard let currentWindows = self.sharedApplication?.windows else { return nil } var rootViewController: UIViewController? for window in currentWindows { @@ -22,7 +22,7 @@ extension UIViewController { } /// Returns the top most view controller from given view controller's stack. - open class func topMost(of viewController: UIViewController?) -> UIViewController? { + public class func topMost(of viewController: UIViewController?) -> UIViewController? { // presented view controller if let presentedViewController = viewController?.presentedViewController { return self.topMost(of: presentedViewController)