-
Notifications
You must be signed in to change notification settings - Fork 32
38 lines (38 loc) · 1.33 KB
/
run-swift-tests.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
name: Run Swift Tests
concurrency:
group: run-swift-tests-${{ github.ref }}
cancel-in-progress: true
on:
workflow_dispatch:
workflow_call:
env:
XCODE_VERSION: '15.2'
XCODEBUILD_DESTINATION_iOS: platform=iOS Simulator,name=iPhone 15 Pro
XCODEBUILD_DESTINATION_macOS: platform=OS X
XCODEBUILD_DESTINATION_tvOS: platform=tvOS Simulator,name=Apple TV 4K (3rd generation)
XCODEBUILD_DESTINATION_watchOS: platform=watchOS Simulator,name=Apple Watch Series 9 (45mm)
jobs:
run-swift-tests:
strategy:
fail-fast: false
matrix:
platform: [ iOS, macOS, tvOS, watchOS ]
implementation: [ Async, Combine, RxSwift ]
name: ${{ format('{0} {1}', matrix.implementation, matrix.platform) }}
runs-on: macos-14
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Setup Xcode
uses: maxim-lobanov/setup-xcode@v1
with:
xcode-version: ${{ env.XCODE_VERSION }}
- name: Run tests
env:
XCODEBUILD_SCHEME: ${{ format('KMPNativeCoroutines{0}', matrix.implementation) }}
XCODEBUILD_DESTINATION: ${{ env[format('XCODEBUILD_DESTINATION_{0}', matrix.platform)] }}
run: >-
xcodebuild test
-project KMPNativeCoroutines.xcodeproj
-scheme "$XCODEBUILD_SCHEME"
-destination "$XCODEBUILD_DESTINATION"