This repository has been archived by the owner on May 6, 2024. It is now read-only.
chore: update xcode for github actions #846
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: "edX Test Suit" | |
on: | |
pull_request: | |
push: | |
branches: | |
- master | |
jobs: | |
xcode-ios: | |
name: "${{ matrix.env.name }}" | |
runs-on: macos-13 | |
strategy: | |
fail-fast: false | |
matrix: | |
env: | |
- name: "Test iOS 16" | |
runtime: "iOS-16-4" | |
device: "iPhone 14 Pro" | |
task: "testLTRCurrentOS" | |
- name: "Test RTL iOS 16" | |
runtime: "iOS-16-4" | |
device: "iPhone 14 Pro" | |
task: "testRTLCurrentOS" | |
steps: | |
- name: "Select Xcode 14.3.1" | |
run: | | |
sudo xcode-select -s /Applications/Xcode_14.3.1.app | |
xcrun simctl list runtimes | |
xcrun simctl list devices | |
- name: Git checkout | |
uses: actions/checkout@v2 | |
- name: Set up Java | |
uses: actions/setup-java@v3 | |
with: | |
distribution: 'temurin' | |
java-version: 11 | |
- name: Run tests | |
if: always() | |
run: | | |
TASK="${{ matrix.env.task }}" | |
RUNTIME="${{ matrix.env.runtime }}" | |
DEVICE="${{ matrix.env.device }}" | |
DEVICE_ID=com.apple.CoreSimulator.SimDeviceType.$(echo $DEVICE | sed -E -e "s/[ \\-]+/ /g" -e "s/[^[:alnum:]]/-/g") | |
RUNTIME_ID=com.apple.CoreSimulator.SimRuntime.$(echo $RUNTIME | sed -E -e "s/[ \\-]+/ /g" -e "s/[^[:alnum:]]/-/g") | |
DESTINATION_ID=$(xcrun simctl create "$DEVICE, $RUNTIME" $DEVICE_ID $RUNTIME_ID) | |
xcrun simctl boot $DESTINATION_ID | |
./gradlew -q $TASK | xcpretty -c | |
shell: bash |