Skip to content

Commit

Permalink
Simplify SPM Xcodebuild GitHub Action (#13)
Browse files Browse the repository at this point in the history
  • Loading branch information
PSchmiedmayer authored Oct 26, 2022
1 parent 71471b6 commit 94e52b2
Showing 1 changed file with 4 additions and 11 deletions.
15 changes: 4 additions & 11 deletions .github/workflows/build-and-test-xcodebuild-spm.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,10 +21,6 @@ on:
required: false
type: string
default: ''
targetname:
description: 'Name of the target in the Swift Package. Required for generating a test coverage.'
required: true
type: string

jobs:
build_and_test:
Expand All @@ -44,20 +40,17 @@ jobs:
swift --version
echo "inputs.path: ${{ inputs.path }}"
echo "inputs.scheme: ${{ inputs.scheme }}"
echo "inputs.targetname: ${{ inputs.targetname }}"
- name: Build and Test
run: |
INPUT_SCHEME=${{ inputs.scheme }}
SCHEME=${INPUT_SCHEME:-"${{ inputs.targetname }}-Package"}
xcodebuild test \
-scheme $SCHEME \
-scheme ${{ inputs.scheme }} \
-sdk iphonesimulator \
-destination "name=iPhone 14 Pro Max" \
-enableCodeCoverage YES \
-resultBundlePath ${{ inputs.targetname }}.xcresult \
-resultBundlePath ${{ inputs.scheme }}.xcresult \
CODE_SIGNING_ALLOWED="NO"
- name: Upload Artifact
uses: actions/upload-artifact@v3
with:
name: ${{ inputs.targetname }}.xcresult
path: ${{ inputs.targetname }}.xcresult
name: ${{ inputs.scheme }}.xcresult
path: ${{ inputs.scheme }}.xcresult

0 comments on commit 94e52b2

Please sign in to comment.