Refactor and make the code more robust #84
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: LeitnerBox UnitTest | |
on: | |
push: | |
branches: ["main"] | |
pull_request: | |
branches: ["main"] | |
jobs: | |
build: | |
name: Build and Test Unit Tests | |
runs-on: macos-latest | |
env: | |
IS_CONTINUOUS_INTEGRATION: 1 | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Select Xcode | |
run: sudo xcode-select -switch /Applications/Xcode_14.2.app && /usr/bin/xcodebuild -version | |
- name: Run Simulator | |
run: open -a Simulator --args -CurrentDeviceUDID 'iPhone 14' | sleep 15 | |
- name: Run Unit Tests | |
run: xcodebuild clean CODE_SIGN_IDENTITY="" CODE_SIGN_ENTITLEMENTS="" CODE_SIGNING_REQUIRED="NO" CODE_SIGNING_ALLOWED="NO" test -project LeitnerBox.xcodeproj -scheme LeitnerBox -sdk iphonesimulator -destination 'platform=iOS Simulator,name=iPhone 14,OS=16.2' -only-testing:LeitnerBoxTests IS_CONTINUOUS_INTEGRATION=$IS_CONTINUOUS_INTEGRATION | xcpretty && exit ${PIPESTATUS[0]} |