Skip to content

Commit 94e52b2

Browse files
Simplify SPM Xcodebuild GitHub Action (#13)
1 parent 71471b6 commit 94e52b2

1 file changed

Lines changed: 4 additions & 11 deletions

File tree

.github/workflows/build-and-test-xcodebuild-spm.yml

Lines changed: 4 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -21,10 +21,6 @@ on:
2121
required: false
2222
type: string
2323
default: ''
24-
targetname:
25-
description: 'Name of the target in the Swift Package. Required for generating a test coverage.'
26-
required: true
27-
type: string
2824

2925
jobs:
3026
build_and_test:
@@ -44,20 +40,17 @@ jobs:
4440
swift --version
4541
echo "inputs.path: ${{ inputs.path }}"
4642
echo "inputs.scheme: ${{ inputs.scheme }}"
47-
echo "inputs.targetname: ${{ inputs.targetname }}"
4843
- name: Build and Test
4944
run: |
50-
INPUT_SCHEME=${{ inputs.scheme }}
51-
SCHEME=${INPUT_SCHEME:-"${{ inputs.targetname }}-Package"}
5245
xcodebuild test \
53-
-scheme $SCHEME \
46+
-scheme ${{ inputs.scheme }} \
5447
-sdk iphonesimulator \
5548
-destination "name=iPhone 14 Pro Max" \
5649
-enableCodeCoverage YES \
57-
-resultBundlePath ${{ inputs.targetname }}.xcresult \
50+
-resultBundlePath ${{ inputs.scheme }}.xcresult \
5851
CODE_SIGNING_ALLOWED="NO"
5952
- name: Upload Artifact
6053
uses: actions/upload-artifact@v3
6154
with:
62-
name: ${{ inputs.targetname }}.xcresult
63-
path: ${{ inputs.targetname }}.xcresult
55+
name: ${{ inputs.scheme }}.xcresult
56+
path: ${{ inputs.scheme }}.xcresult

0 commit comments

Comments
 (0)