Skip to content

Commit 81f2fe8

Browse files
committed
➕ Add reusable workflow parameter about working directory for shell script gets all tests.
1 parent c3299db commit 81f2fe8

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

.github/workflows/rw_get_tests.yaml

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44
# Run a specific shell script to get all test items.
55
#
66
# Workflow input parameters:
7+
# * test_working_directory: The working directory for test running.
78
# * shell_path: The file path of shell script which gets all the test items.
89
# * shell_arg: The arguments of the shell script which gets all the test items.
910
# * use_customized_shell: Don't use the shell script template project prepares, run customized shell script.
@@ -18,6 +19,11 @@ name: Prepare test items
1819
on:
1920
workflow_call:
2021
inputs:
22+
test_working_directory:
23+
description: "The working directory for test running."
24+
required: false
25+
type: string
26+
default: ''
2127
shell_path:
2228
description: "The file path of shell script which gets all the test items."
2329
required: false
@@ -53,6 +59,7 @@ jobs:
5359
run: curl https://raw.githubusercontent.com/Chisanan232/GitHub-Action_Reusable_Workflows-Python/develop/scripts/ci/get-all-tests.sh --output ${{ inputs.shell_path }}
5460

5561
- id: set-matrix
62+
working-directory: ${{ inputs.test_working_directory }}
5663
run: |
5764
sudo apt-get install jq
5865
echo "all_test_items=$(bash ${{ inputs.shell_path }} ${{ inputs.shell_arg }})" >> $GITHUB_OUTPUT

0 commit comments

Comments
 (0)