Skip to content

Commit

Permalink
Matrix test the Xcode unit tests across device types
Browse files Browse the repository at this point in the history
  • Loading branch information
mikenachbaur-okta committed Aug 15, 2024
1 parent e593c8e commit 55f44d2
Showing 1 changed file with 31 additions and 34 deletions.
65 changes: 31 additions & 34 deletions .github/workflows/tests.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,6 @@ on:
env:
DEVELOPER_DIR: /Applications/Xcode_15.4.app/Contents/Developer
NSUnbufferedIO: YES
iOS_DESTINATION: "platform=iOS Simulator,OS=17.5,name=iPhone 15 Pro Max"
tvOS_DESTINATION: "platform=tvOS Simulator,OS=17.5,name=Apple TV"

jobs:
SwiftBuild:
Expand Down Expand Up @@ -68,6 +66,13 @@ jobs:
XcodeBuild:
name: Xcode Unit Tests
runs-on: macos-latest-large
strategy:
matrix:
destination:
- "platform=iOS Simulator,OS=16.4,name=iPhone 14 Pro Max"
- "platform=iOS Simulator,OS=17.5,name=iPhone 15 Pro Max"
- "platform=tvOS Simulator,OS=17.5,name=Apple TV"
- "platform:macOS,name=My Mac"
timeout-minutes: 25
steps:
- uses: actions/checkout@master
Expand All @@ -78,61 +83,53 @@ jobs:
-derivedDataPath ../Build/DerivedData \
-clonedSourcePackagesDirPath ../Build/ClonedSources \
-scheme AuthFoundation \
-sdk iphonesimulator \
-destination "$iOS_DESTINATION" 2>&1
- name: Build OktaDirectAuth
run: |
set -o pipefail && xcodebuild build \
-derivedDataPath ../Build/DerivedData \
-clonedSourcePackagesDirPath ../Build/ClonedSources \
-scheme OktaDirectAuth \
-sdk iphonesimulator \
-destination "$iOS_DESTINATION" 2>&1
- name: Build OktaOAuth2
-destination "${{ matrix.destination }}" 2>&1
- name: Test AuthFoundation
run: |
set -o pipefail && xcodebuild build \
set -o pipefail && xcodebuild test \
-derivedDataPath ../Build/DerivedData \
-clonedSourcePackagesDirPath ../Build/ClonedSources \
-scheme OktaOAuth2 \
-sdk iphonesimulator \
-destination "$iOS_DESTINATION" 2>&1
- name: Build WebAuthenticationUI
-scheme AuthFoundation \
-destination "${{ matrix.destination }}" 2>&1
- name: Build OktaDirectAuth
run: |
set -o pipefail && xcodebuild build \
-derivedDataPath ../Build/DerivedData \
-clonedSourcePackagesDirPath ../Build/ClonedSources \
-scheme WebAuthenticationUI \
-sdk iphonesimulator \
-destination "$iOS_DESTINATION" 2>&1
- name: Test AuthFoundation
-scheme OktaDirectAuth \
-destination "${{ matrix.destination }}" 2>&1
- name: Test OktaDirectAuth
run: |
set -o pipefail && xcodebuild test \
-derivedDataPath ../Build/DerivedData \
-clonedSourcePackagesDirPath ../Build/ClonedSources \
-scheme AuthFoundation \
-sdk iphonesimulator \
-destination "$iOS_DESTINATION" 2>&1
- name: Test OktaDirectAuth
-scheme OktaDirectAuth \
-destination "${{ matrix.destination }}" 2>&1
- name: Build OktaOAuth2
run: |
set -o pipefail && xcodebuild test \
set -o pipefail && xcodebuild build \
-derivedDataPath ../Build/DerivedData \
-clonedSourcePackagesDirPath ../Build/ClonedSources \
-scheme OktaDirectAuth \
-sdk iphonesimulator \
-destination "$iOS_DESTINATION" 2>&1
-scheme OktaOAuth2 \
-destination "${{ matrix.destination }}" 2>&1
- name: Test OktaOAuth2
run: |
set -o pipefail && xcodebuild test \
-derivedDataPath ../Build/DerivedData \
-clonedSourcePackagesDirPath ../Build/ClonedSources \
-scheme OktaOAuth2 \
-sdk iphonesimulator \
-destination "$iOS_DESTINATION" 2>&1
-destination "${{ matrix.destination }}" 2>&1
- name: Build WebAuthenticationUI
run: |
set -o pipefail && xcodebuild build \
-derivedDataPath ../Build/DerivedData \
-clonedSourcePackagesDirPath ../Build/ClonedSources \
-scheme WebAuthenticationUI \
-destination "${{ matrix.destination }}" 2>&1
- name: Test WebAuthenticationUI
run: |
set -o pipefail && xcodebuild test \
-derivedDataPath ../Build/DerivedData \
-clonedSourcePackagesDirPath ../Build/ClonedSources \
-scheme WebAuthenticationUI \
-sdk iphonesimulator \
-destination "$iOS_DESTINATION" 2>&1
-destination "${{ matrix.destination }}" 2>&1

0 comments on commit 55f44d2

Please sign in to comment.