Skip to content

Commit

Permalink
Merge pull request #14 from undabot/fix/workflow
Browse files Browse the repository at this point in the history
update workflow to find simulator
  • Loading branch information
JFejza authored May 17, 2024
2 parents a64257d + 0efd3f1 commit 6f4949f
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions .github/workflows/ios.yml
Original file line number Diff line number Diff line change
Expand Up @@ -43,20 +43,20 @@ jobs:
scheme: ${{ 'default' }}
platform: ${{ 'iOS Simulator' }}
run: |
device=`xcrun simctl list devices 2>&1| grep -oE 'iPhone.*?[^\(]+' | head -1 | awk '{$1=$1;print}'`
device=`xcrun simctl list devices 2>&1| grep -oE 'iPhone 15' | head -1`
if [ $scheme = default ]; then scheme=$(cat default); fi
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
file_to_build=`echo $file_to_build | awk '{$1=$1;print}'`
xcodebuild build-for-testing -scheme "$scheme" -"$filetype_parameter" "$file_to_build" -destination "platform=$platform,name=$device" -enableCodeCoverage YES
xcodebuild build-for-testing -scheme "$scheme" -"$filetype_parameter" "$file_to_build" -destination "platform=$platform,name=$device,OS=17.5" -enableCodeCoverage YES
- name: Test
env:
scheme: ${{ 'default' }}
platform: ${{ 'iOS Simulator' }}
run: |
device=`xcrun simctl list devices 2>&1| grep -oE 'iPhone.*?[^\(]+' | head -1 | awk '{$1=$1;print}'`
device=`xcrun simctl list devices 2>&1| grep -oE 'iPhone 15' | head -1`
if [ $scheme = default ]; then scheme=$(cat default); fi
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
file_to_build=`echo $file_to_build | awk '{$1=$1;print}'`
xcodebuild test-without-building -scheme "$scheme" -"$filetype_parameter" "$file_to_build" -destination "platform=$platform,name=$device" -enableCodeCoverage YES
xcodebuild test-without-building -scheme "$scheme" -"$filetype_parameter" "$file_to_build" -destination "platform=$platform,name=$device,OS=17.5" -enableCodeCoverage YES
- name: Upload coverage to Codecov
uses: codecov/[email protected]

0 comments on commit 6f4949f

Please sign in to comment.