Skip to content

Commit

Permalink
Update test actions
Browse files Browse the repository at this point in the history
  • Loading branch information
marcosgriselli committed Jun 12, 2024
1 parent 2d3d9b6 commit f52f589
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 21 deletions.
20 changes: 6 additions & 14 deletions .github/workflows/Test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,6 @@ jobs:
run: ls /Applications | grep Xcode
- name: Force Xcode 15.4
run: sudo xcode-select -switch /Applications/Xcode_15.4.app
- name: List available simulators
run: xcrun simctl list
- name: Make project
run: make generate
- name: Run tests
Expand All @@ -37,24 +35,18 @@ jobs:
run: make generate
- name: Run tests
run: make test-iPhone
test_iphone_ios12:
name: Test-iPhone-iOS12
runs-on: macos-10.15
test_iphone_ios15:
name: Test-iPhone-iOS15
runs-on: macos-12
steps:
- name: Checkout
uses: actions/checkout@v2
- name: List available Xcode versions
run: ls /Applications | grep Xcode
- name: Force Xcode 15.4
run: sudo xcode-select -switch /Applications/Xcode_15.4.app
- name: Setup Simulator
run: |
sudo mkdir -p /Library/Developer/CoreSimulator/Profiles/Runtimes
sudo ln -s /Applications/Xcode_15.4.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/Library/CoreSimulator/Profiles/Runtimes/iOS.simruntime /Library/Developer/CoreSimulator/Profiles/Runtimes/iOS\ 12.4.simruntime
- name: List available simulators
run: xcrun simctl list
- name: Force Xcode 13.1
run: sudo xcode-select -switch /Applications/Xcode_13.1.app
- name: Make project
run: make generate
- name: Run tests
run: make test-iPhone-iOS12
run: make test-iPhone-iOS15

22 changes: 15 additions & 7 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
.DEFAULT_GOAL := generate

# Code Signing Settings

NO_CODE_SIGN_SETTINGS = CODE_SIGN_IDENTITY="" CODE_SIGNING_REQUIRED=NO CODE_SIGNING_ALLOWED=NO

# Install Tasks

install-lint:
Expand All @@ -23,24 +27,28 @@ test-iPad:
xcodebuild \
-project Hammer.xcodeproj \
-scheme Hammer \
-destination "name=iPad Pro (12.9-inch) (4th generation)" \
test
-destination "name=iPad Pro (12.9-inch) (6th generation)" \
test \
$(NO_CODE_SIGN_SETTINGS)

test-iPhone:
set -o pipefail && \
xcodebuild \
-project Hammer.xcodeproj \
-scheme Hammer \
-destination "name=iPhone 11" \
test
-destination "name=iPhone 15" \
test \
$(NO_CODE_SIGN_SETTINGS)

test-iPhone-iOS12:
test-iPhone-iOS15:
set -o pipefail && \
xcodebuild \
-project Hammer.xcodeproj \
-scheme Hammer \
-destination "name=iPhone 6" \
test
-destination "name=iPhone 11" \
-sdk iphonesimulator15.0 \
test \
$(NO_CODE_SIGN_SETTINGS)

# List all targets (from https://stackoverflow.com/questions/4219255/how-do-you-get-the-list-of-targets-in-a-makefile)

Expand Down

0 comments on commit f52f589

Please sign in to comment.