Skip to content

Commit ec43d89

Browse files
committed
Support custom build commands
1 parent b533cd4 commit ec43d89

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

.github/workflows/swift_package_test.yml

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,10 @@ on:
2323
type: string
2424
description: "Command to execute before building the Swift package"
2525
default: ""
26+
build_command:
27+
type: string
28+
description: "Build command default is swift test"
29+
default: "swift test"
2630
env_vars:
2731
description: "List of environment variables."
2832
type: string
@@ -54,5 +58,5 @@ jobs:
5458
done
5559
- name: Pre-build
5660
run: ${{ inputs.pre_build_command }}
57-
- name: Build Swift Package
58-
run: swift test ${{ (contains(matrix.swift_version, 'nightly') && inputs.swift_nightly_flags) || inputs.swift_flags }}
61+
- name: Build
62+
run: ${{ inputs.build_command }} ${{ (contains(matrix.swift_version, 'nightly') && inputs.swift_nightly_flags) || inputs.swift_flags }}

0 commit comments

Comments
 (0)