Skip to content

Commit 8b419b5

Browse files
authored
Combine build and test into a single step (#299)
For some reason, when we make build and test 2 separate steps, the tests never actually run and the job fails.
1 parent 80e55da commit 8b419b5

1 file changed

Lines changed: 2 additions & 14 deletions

File tree

.github/workflows/ios.yml

Lines changed: 2 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ jobs:
1414
steps:
1515
- name: Checkout
1616
uses: actions/checkout@v2
17-
- name: Build
17+
- name: Build and Test
1818
env:
1919
scheme: ${{ 'SDKHostApp' }}
2020
platform: ${{ 'iOS Simulator' }}
@@ -25,16 +25,4 @@ jobs:
2525
if [ $scheme = default ]; then scheme=$(cat default); fi
2626
if [ "`ls -A | grep -i \\.xcworkspace\$`" ]; then filetype_parameter="workspace" && file_to_build="`ls -A | grep -i \\.xcworkspace\$`"; else filetype_parameter="project" && file_to_build="`ls -A | grep -i \\.xcodeproj\$`"; fi
2727
file_to_build=`echo $file_to_build | awk '{$1=$1;print}'`
28-
xcodebuild build-for-testing -scheme "$scheme" -"$filetype_parameter" "$file_to_build" -destination "platform=$platform,OS=$os,name=$device"
29-
- name: Test
30-
env:
31-
scheme: ${{ 'SDKHostApp' }}
32-
platform: ${{ 'iOS Simulator' }}
33-
os: ${{ '15.2' }}
34-
device: ${{ 'iPhone 13' }}
35-
run: |
36-
# xcrun xctrace returns via stderr, not the expected stdout (see https://developer.apple.com/forums/thread/663959)
37-
if [ $scheme = default ]; then scheme=$(cat default); fi
38-
if [ "`ls -A | grep -i \\.xcworkspace\$`" ]; then filetype_parameter="workspace" && file_to_build="`ls -A | grep -i \\.xcworkspace\$`"; else filetype_parameter="project" && file_to_build="`ls -A | grep -i \\.xcodeproj\$`"; fi
39-
file_to_build=`echo $file_to_build | awk '{$1=$1;print}'`
40-
xcodebuild test-without-building -scheme "$scheme" -"$filetype_parameter" "$file_to_build" -destination "platform=$platform,OS=$os,name=$device"
28+
xcodebuild test -scheme "$scheme" -"$filetype_parameter" "$file_to_build" -destination "platform=$platform,OS=$os,name=$device"

0 commit comments

Comments
 (0)