From 905164af2d31be072637b3cd59edb9ad0ff66f36 Mon Sep 17 00:00:00 2001 From: hiroshihorie <548776+hiroshihorie@users.noreply.github.com> Date: Thu, 22 Feb 2024 22:39:55 +0900 Subject: [PATCH] setup --- .github/workflows/testing-matrix.yaml | 28 +++++++++++++++++++++++++ Tests/LiveKitTests/Basic.swift | 21 +++++++++++++++++++ Tests/LiveKitTests/CompleterTests.swift | 4 ++-- 3 files changed, 51 insertions(+), 2 deletions(-) create mode 100644 .github/workflows/testing-matrix.yaml create mode 100644 Tests/LiveKitTests/Basic.swift diff --git a/.github/workflows/testing-matrix.yaml b/.github/workflows/testing-matrix.yaml new file mode 100644 index 000000000..33f01b787 --- /dev/null +++ b/.github/workflows/testing-matrix.yaml @@ -0,0 +1,28 @@ +name: Testing Matrix + +on: + workflow_dispatch: + push: + +jobs: + example_matrix: + strategy: + matrix: + platform: [iOS, macOS] + xcode-version: [14.2, 15.2] + + runs-on: macos-latest + + steps: + - uses: actions/checkout@v3 + + - name: Xcode Version + run: xcodebuild -version + + - name: Show SDKs + run: xcodebuild -showsdks + + - name: Execute Test + run: xcodebuild -scheme LiveKitTests -destination 'platform=macOS,arch=arm64' -only-testing 'LiveKitTests/Basic' test + + # xcodebuild test -scheme LiveKit -sdk iphonesimulator17.2 -destination "OS=17.4,name=iPhone 13 Mini" diff --git a/Tests/LiveKitTests/Basic.swift b/Tests/LiveKitTests/Basic.swift new file mode 100644 index 000000000..a65b36f68 --- /dev/null +++ b/Tests/LiveKitTests/Basic.swift @@ -0,0 +1,21 @@ +/* + * Copyright 2024 LiveKit + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +@testable import LiveKit +import XCTest + +class Basic: XCTestCase { +} diff --git a/Tests/LiveKitTests/CompleterTests.swift b/Tests/LiveKitTests/CompleterTests.swift index 051a0319e..0fcefe902 100644 --- a/Tests/LiveKitTests/CompleterTests.swift +++ b/Tests/LiveKitTests/CompleterTests.swift @@ -51,7 +51,7 @@ class CompleterTests: XCTestCase { group.addTask { print("Timer task: Started...") // Cancel after 3 seconds - try await Task.sleep(until: .now + .seconds(3), clock: .continuous) + // try await Task.sleep(until: .now + .seconds(3), clock: .continuous) print("Timer task: Cancelling...") completer.reset() } @@ -94,7 +94,7 @@ class CompleterTests: XCTestCase { group.addTask { print("Timer task: Started...") // Cancel after 3 seconds - try await Task.sleep(until: .now + .seconds(3), clock: .continuous) + // try await Task.sleep(until: .now + .seconds(3), clock: .continuous) print("Timer task: Completing...") completer.resume(returning: ()) }