Skip to content

Commit

Permalink
Run iOS tests on CI
Browse files Browse the repository at this point in the history
  • Loading branch information
lunij committed Mar 22, 2024
1 parent 97e851b commit 810e667
Show file tree
Hide file tree
Showing 2 changed files with 31 additions and 2 deletions.
26 changes: 26 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,32 @@ jobs:
name: xcresult-macos.zip
path: .xcresults/xcresult-macos.zip

ios:
strategy:
matrix:
xcode:
- "14.3.1"

name: iOS 16.4 (Xcode ${{ matrix.xcode }})
runs-on: macos-13
steps:
- uses: actions/checkout@v4
- name: Select Xcode ${{ matrix.xcode }}
run: sudo xcode-select -s /Applications/Xcode_${{ matrix.xcode }}.app
- name: Run tests
id: run-tests
run: make test-ios
- name: Zip XCResult
id: zip-xcresult
if: failure() && steps.run-tests.conclusion == 'failure'
run: cd .xcresults; zip -r xcresult-ios.zip ios.xcresult
- name: Upload XCResult
if: failure() && steps.zip-xcresult.conclusion == 'success'
uses: actions/upload-artifact@v4
with:
name: xcresult-ios.zip
path: .xcresults/xcresult-ios.zip

ubuntu:
strategy:
matrix:
Expand Down
7 changes: 5 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,11 @@ test-macos:
test-ios:
set -o pipefail && \
xcodebuild test \
-scheme SnapshotTesting \
-destination platform="iOS Simulator,name=iPhone 11 Pro Max,OS=13.3"
-scheme swift-snapshot-testing-Package \
-destination platform="iOS Simulator,name=iPhone 14,OS=16.4"
-resultBundlePath .xcresults/ios \
-workspace . \
| xcbeautify

test-swift:
swift test
Expand Down

0 comments on commit 810e667

Please sign in to comment.