Update unit_test.yml #14
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
name: iOS starter workflow | |
on: | |
push: | |
branches: [ "main" ] | |
pull_request: | |
branches: [ "main" ] | |
workflow_dispatch: | |
env: | |
XCODE_VERSION: 15.0.1 | |
PROJECT_NAME: FoodSpec | |
SIMULATOR: iPhone 15 Pro | |
jobs: | |
build: | |
name: Build and Test default scheme using any available iPhone simulator | |
runs-on: macos-13 | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v3 | |
- run: sudo xcode-select --switch /Applications/Xcode_$XCODE_VERSION.app | |
- name: Run tests | |
run: xcodebuild test -project $PROJECT_NAME.xcodeproj -scheme $PROJECT_NAME -destination 'platform=iOS Simulator,name=${{ env.SIMULATOR }}' -skipMacroValidation -resultBundlePath TestResults | |
- uses: kishikawakatsumi/xcresulttool@v1 | |
with: | |
path: TestResults.xcresult | |
if: success() || failure() |