-
Notifications
You must be signed in to change notification settings - Fork 7
34 lines (31 loc) · 1.4 KB
/
ios.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
name: iOS starter workflow
on:
push:
branches: [ master ]
pull_request:
branches: [ master ]
jobs:
build:
name: Build and Test default scheme using any available iPhone simulator
runs-on: macos-latest
steps:
- name: Checkout
uses: actions/checkout@v2
- name: Build
env:
project: ${{ 'Paysafe_SDK' }}
scheme: ${{ 'Paysafe_SDK' }}
platform: ${{ 'iOS Simulator' }}
run: |
# xcrun xctrace returns via stderr, not the expected stdout (see https://developer.apple.com/forums/thread/663959)
device=`xcrun simctl list devices 2>&1 | grep -oE 'iPhone [1-9][1-9][ ]*[a-zA-Z]*[ ]*[a-zA-Z]*'| head -1 | awk '{$1=$1;print}'`
xcodebuild build-for-testing -project "$project.xcodeproj" -scheme "$scheme" -destination "platform=$platform,name=$device"
- name: Test
env:
project: ${{ 'Paysafe_SDK' }}
scheme: ${{ 'Paysafe_SDK' }}
platform: ${{ 'iOS Simulator' }}
run: |
# xcrun xctrace returns via stderr, not the expected stdout (see https://developer.apple.com/forums/thread/663959)
device=`xcrun simctl list devices 2>&1 | grep -oE 'iPhone [1-9][1-9][ ]*[a-zA-Z]*[ ]*[a-zA-Z]*'| head -1 | awk '{$1=$1;print}'`
xcodebuild test-without-building -project "$project.xcodeproj" -scheme "$scheme" -destination "platform=$platform,name=$device"