Xcode - Build and Test #2
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: Xcode - Build and Test | |
on: | |
push: | |
branches: [ "main" ] | |
pull_request: | |
branches: [ "main" ] | |
workflow_dispatch: #Allow manually triggering workflow | |
jobs: | |
build: | |
name: Build and test Swift project | |
runs-on: macos-latest | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v2 | |
- name: Set Up Xcode | |
uses: actions/setup-xcode@v2 | |
with: | |
xcode-version: '13.0' # Adjust to your preferred Xcode version | |
- name: Build and Test | |
run: | | |
xcodebuild clean build test \ | |
-project YourProject.xcodeproj \ # Adjust the project name | |
-scheme YourScheme \ # Adjust the scheme name | |
-destination 'platform=macOS' \ | |
-enableCodeCoverage YES | xcpretty && exit ${PIPESTATUS[0]} |