Skip to content

Commit

Permalink
ci: run test on multiple os versions
Browse files Browse the repository at this point in the history
  • Loading branch information
PouriaAmini committed Aug 15, 2024
1 parent 3b083fa commit 8e5b2c8
Showing 1 changed file with 9 additions and 4 deletions.
13 changes: 9 additions & 4 deletions .github/workflows/unit-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,24 +20,29 @@ jobs:
platform: iOS
xcode: 15.2
device: "iPhone 15"
test-destination-os: latest

- runs-on: macos-12
platform: iOS
xcode: 14.1
test-destination-os: 16.4
device: "iPhone 14"

- runs-on: macos-13
platform: macOS
xcode: 15.2
test-destination-os: latest

- runs-on: macos-13
platform: tvOS
xcode: 15.2
test-destination-os: latest
device: "Apple TV"

- runs-on: macos-13
platform: watchOS
xcode: 15.2
test-destination-os: latest
device: "Apple Watch Series 8 (41mm)"
steps:
- name: Checkout
Expand All @@ -58,26 +63,26 @@ jobs:
xcodebuild test \
-scheme Amplitude-Swift-Package \
-sdk iphonesimulator \
-destination 'platform=iOS Simulator,name=${{ matrix.device }}'
-destination 'platform=iOS Simulator,OS=${{ matrix.test-destination-os }},name=${{ matrix.device }}'
;;
macOS)
xcodebuild test \
-scheme Amplitude-Swift-Package \
-sdk macosx \
-destination 'platform=macosx'
-destination 'platform=macosx,OS=${{ matrix.test-destination-os }}'
;;
tvOS)
xcodebuild \
-scheme Amplitude-Swift-Package \
-sdk appletvsimulator \
-destination 'platform=tvOS Simulator,name=${{ matrix.device }}' \
-destination 'platform=tvOS Simulator,OS=${{ matrix.test-destination-os }},name=${{ matrix.device }}' \
test
;;
watchOS)
xcodebuild \
-scheme Amplitude-Swift-Package \
-sdk watchsimulator \
-destination 'platform=watchOS Simulator,name=${{ matrix.device }}' \
-destination 'platform=watchOS Simulator,OS=${{ matrix.test-destination-os }},name=${{ matrix.device }}' \
test
;;
esac
Expand Down

0 comments on commit 8e5b2c8

Please sign in to comment.