Skip to content

Commit

Permalink
Add test matrix for latest macOS
Browse files Browse the repository at this point in the history
  • Loading branch information
g-mark committed Jun 6, 2024
1 parent 752a613 commit eda537e
Show file tree
Hide file tree
Showing 2 changed files with 31 additions and 59 deletions.
32 changes: 31 additions & 1 deletion .github/workflows/build-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down
58 changes: 0 additions & 58 deletions Example/LassoTestUtilities_Tests/AssertionTimeoutTests.swift
Original file line number Diff line number Diff line change
Expand Up @@ -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()
}
}
)
}

}
Expand All @@ -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)
}

}

0 comments on commit eda537e

Please sign in to comment.