Create workflow for build and test with GA #1
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: [ "master", "test_ga_build" ] | |
pull_request: | |
branches: [ "master" ] | |
jobs: | |
build: | |
name: Build and Test default scheme using any available iPhone simulator | |
runs-on: macos-13-arm64 | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v3 | |
- name: Set Default Scheme | |
run: | | |
scheme_list=$(xcodebuild -list -json | tr -d "\n") | |
default=$(echo $scheme_list | ruby -e "require 'json'; puts JSON.parse(STDIN.gets)['project']['targets'][0]") | |
echo $default | cat >default | |
echo Using default scheme: $default | |
- name: Build | |
env: | |
scheme: ${{ 'Demo' }} | |
destination: ${{ 'platform=iOS Simulator,OS=15.2,name=iPhone 13 Pro' }} | |
run: | | |
xcodebuild build-for-testing -scheme "$scheme" -workspace FinniversKit.xcworkspace -destination "$platform" | |
- name: Test | |
env: | |
scheme: ${{ 'Demo' }} | |
destination: ${{ 'platform=iOS Simulator,OS=15.2,name=iPhone 13 Pro' }} | |
run: | | |
xcodebuild test-without-building -scheme "$scheme" -workspace FinniversKit.xcworkspace -destination "$platform" |