amplify-swift/.github/composite_actions/run_xcodebuild_test/action.yml

26 lines
718 B
YAML

name: 'Run xcodebuild test'
description: 'Action runs the test for the scheme specified'
inputs:
scheme:
required: true
type: string
project_path:
required: false
type: string
destination:
required: false
type: string
default: 'platform=iOS Simulator,name=iPhone 13,OS=latest'
runs:
using: "composite"
steps:
- name: Test ${{ inputs.scheme }}
env:
SCHEME: ${{ inputs.scheme }}
PROJECT_PATH: ${{ inputs.project_path }}
run: |
cd $PROJECT_PATH
xcodebuild test -scheme $SCHEME -sdk iphonesimulator -destination '${{ inputs.destination }}' | xcpretty --simple --color --report junit && exit ${PIPESTATUS[0]}
shell: bash