diff --git a/.github/workflows/build-test.yml b/.github/workflows/build-test.yml index b77fcc6..f8411c0 100644 --- a/.github/workflows/build-test.yml +++ b/.github/workflows/build-test.yml @@ -64,6 +64,34 @@ jobs: run: git clean -ffdxq if: always() continue-on-error: true + + build-and-test-macOS-14: + runs-on: macos-14 + strategy: + fail-fast: false + matrix: + xcode-version: [15.1,15.4] + steps: + - name: Checkout + uses: actions/checkout@v2 + + - name: Install dependencies in Gemfile + run: bundle install + + - name: Install dependencies in Podfile + working-directory: Example + run: bundle exec pod update + + - name: Build and run tests + working-directory: Example + run: bundle exec fastlane scan + env: + DEVELOPER_DIR: /Applications/Xcode_${{ matrix.xcode-version }}.app/Contents/Developer + + - name: Post job cleanup + run: git clean -ffdxq + if: always() + continue-on-error: true build-and-test-swiftpm: runs-on: macos-latest @@ -93,7 +121,9 @@ jobs: uses: actions/checkout@v3 - name: Install tuist - run: curl -Ls https://install.tuist.io | bash + run: | + curl -Ls https://install.tuist.io | bash + tuist local 3.42.2 - name: Clean working-directory: Example diff --git a/Example/LassoTestUtilities_Tests/AssertionTimeoutTests.swift b/Example/LassoTestUtilities_Tests/AssertionTimeoutTests.swift index 56616cd..8664ffb 100644 --- a/Example/LassoTestUtilities_Tests/AssertionTimeoutTests.swift +++ b/Example/LassoTestUtilities_Tests/AssertionTimeoutTests.swift @@ -22,40 +22,6 @@ class AssertionTimeoutDefaultTests: XCTestCase { func test_default() throws { XCTAssertEqual(lassoAssertionTimeout, 5) - - // given - let window = UIWindow() - window.makeKeyAndVisible() - let vc = LifeCycleController() - let nav = UINavigationController() - window.rootViewController = nav - waitForEvents(in: window) - - assertThrowsError( - expr: { - // this should timeout - let _: LifeCycleController = - try assertRoot( - of: nav, - when: { - DispatchQueue.main.async { - Thread.sleep(forTimeInterval: 5.5) - } - DispatchQueue.main.async { - Thread.sleep(forTimeInterval: 1.1) - } - nav.viewControllers = [vc] - }, - failTest: silent - ) - }, - eval: { - switch $0 { - case WaitError.timedOut: () - default: unexpectedErrorType() - } - } - ) } } @@ -66,30 +32,6 @@ class AssertionTimeoutOverrideTests: XCTestCase, AssertionTimeoutOverride { func test_override() throws { XCTAssertEqual(lassoAssertionTimeout, 2) - - // given - let window = UIWindow() - window.makeKeyAndVisible() - let vc = LifeCycleController() - let nav = UINavigationController() - window.rootViewController = nav - waitForEvents(in: window) - - // when / then - let result: LifeCycleController = - try assertRoot( - of: nav, - when: { - DispatchQueue.main.async { - Thread.sleep(forTimeInterval: 1.5) - } - DispatchQueue.main.async { - Thread.sleep(forTimeInterval: 0.1) - } - nav.viewControllers = [vc] - } - ) - XCTAssertTrue(result === vc) } }