Unverified Commit 30a5e9bb authored by Oleksandr Karpovich's avatar Oleksandr Karpovich Committed by GitHub

Make CI automatically choose iPhone for tests (#809)

* Make CI choose iPhone for tests

* fix

* fix

* fix

* enable all other jobs back
parent b6a1e94c
# Default Skiko CI # Default Skiko CI
name: CI name: CI
env:
IOS_SIM_UUID: '856515E5-1A3B-4E89-93E4-421B21D79892' # take a look at `xcrun simctl list devices` at GitHub Actions log
on: on:
push: push:
branches: [ master ] branches: [ master ]
...@@ -62,7 +59,19 @@ jobs: ...@@ -62,7 +59,19 @@ jobs:
java-version: '11' java-version: '11'
cache: 'gradle' cache: 'gradle'
- run: xcrun simctl list devices # Look here to get device ids - name: 'Print the devices list'
run: xcrun simctl list devices available --json
# install jq - cli tool for json querying
# retrieve the device .udid to use in tests and store it in env var
- name: 'Set Up Simulator UUID'
run: |
brew install jq &&
IOS_SIM_UUID=$(xcrun simctl list devices available --json | jq -r '.devices."com.apple.CoreSimulator.SimRuntime.iOS-17-0"[] | select(.name == "iPhone 14") | .udid') &&
echo "IOS_SIM_UUID=$IOS_SIM_UUID" >> $GITHUB_ENV
- name: 'Print Selected UUID'
run: echo $IOS_SIM_UUID
- name: 'Compile and run iOS x64 tests' - name: 'Compile and run iOS x64 tests'
uses: nick-fields/retry@v2 uses: nick-fields/retry@v2
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment