-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #14 from undabot/fix/workflow
update workflow to find simulator
- Loading branch information
Showing
1 changed file
with
4 additions
and
4 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -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] |