Skip to content

Commit

Permalink
ci: GitHub Actions Xcode version test matrix
Browse files Browse the repository at this point in the history
  • Loading branch information
einsteinx2 committed Aug 29, 2023
1 parent 169b997 commit e6a0d73
Showing 1 changed file with 50 additions and 24 deletions.
74 changes: 50 additions & 24 deletions .github/workflows/native-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,38 +9,64 @@ on:
- development

jobs:
ios-unit-tests:
runs-on: macos-latest
native-unit-tests:
strategy:
matrix:
include:
- xcode: "14.3.1"
platform: iOS
device: iPhone 14
os: "16.4"
- xcode: "15.0"
platform: iOS
device: iPhone 14
os: "17.0"
- xcode: "14.3.1"
platform: tvOS
device: Apple TV
os: "16.4"
- xcode: "15.0"
platform: tvOS
device: Apple TV
os: "17.0"
runs-on: macos-13
steps:
- name: Checkout
uses: actions/checkout@v3

- name: Select Xcode
run: sudo xcode-select -s /Applications/Xcode_${{ matrix.xcode }}.app

- name: Run iOS unit tests
run: xcodebuild -project mParticle-Apple-SDK.xcodeproj -scheme mParticle-Apple-SDK -destination "platform=iOS Simulator,name=iPhone 14,OS=latest" test
run: xcodebuild -project mParticle-Apple-SDK.xcodeproj -scheme mParticle-Apple-SDK -destination 'platform=${{ matrix.platform }} Simulator,name=${{ matrix.device }},OS=${{ matrix.os }}' test

tvos-unit-tests:
runs-on: macos-latest
steps:
- name: Checkout
uses: actions/checkout@v3

- name: Run tvOS unit tests
run: xcodebuild -project mParticle-Apple-SDK.xcodeproj -scheme mParticle-Apple-SDK -destination "platform=tvOS Simulator,name=Apple TV,OS=latest" test

ios-nolocation-unit-tests:
runs-on: macos-latest
native-nolocation-unit-tests:
strategy:
matrix:
include:
- xcode: "14.3.1"
platform: iOS
device: iPhone 14
os: "16.4"
- xcode: "15.0"
platform: iOS
device: iPhone 14
os: "17.0"
- xcode: "14.3.1"
platform: tvOS
device: Apple TV
os: "16.4"
- xcode: "15.0"
platform: tvOS
device: Apple TV
os: "17.0"
runs-on: macos-13
steps:
- name: Checkout
uses: actions/checkout@v3

- name: Select Xcode
run: sudo xcode-select -s /Applications/Xcode_${{ matrix.xcode }}.app

- name: Run iOS unit tests
run: xcodebuild -project mParticle-Apple-SDK.xcodeproj -scheme mParticle-Apple-SDK-NoLocation -destination "platform=iOS Simulator,name=iPhone 14,OS=latest" test

tvos-nolocation-unit-tests:
runs-on: macos-latest
steps:
- name: Checkout
uses: actions/checkout@v3

- name: Run tvOS unit tests
run: xcodebuild -project mParticle-Apple-SDK.xcodeproj -scheme mParticle-Apple-SDK-NoLocation -destination "platform=tvOS Simulator,name=Apple TV,OS=latest" test
run: xcodebuild -project mParticle-Apple-SDK.xcodeproj -scheme mParticle-Apple-SDK-NoLocation -destination 'platform=${{ matrix.platform }} Simulator,name=${{ matrix.device }},OS=${{ matrix.os }}' test

0 comments on commit e6a0d73

Please sign in to comment.