Skip to content

Commit e9d6742

Browse files
committed
➕ Add new reusable argument and step process to use default or customized shell script to get all path of test modules.
1 parent c50d921 commit e9d6742

File tree

1 file changed

+12
-0
lines changed

1 file changed

+12
-0
lines changed

.github/workflows/prepare_test_items.yaml

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@
66
# Workflow input parameters:
77
# * shell_path: The file path of shell script which gets all the test items.
88
# * shell_arg: The arguments of the shell script which gets all the test items.
9+
# * use_customized_shell: Don't use the shell script template project prepares, run customized shell script.
910
#
1011
# Workflow running output:
1112
# Yes, it has running result output. The output is the paths of all test items.
@@ -21,10 +22,16 @@ on:
2122
description: "The file path of shell script which gets all the test items."
2223
required: true
2324
type: string
25+
default: './scripts/ci/get-all-tests.sh'
2426
shell_arg:
2527
description: "The arguments of the shell script which gets all the test items."
2628
required: true
2729
type: string
30+
use_customized_shell:
31+
description: "If it's true, it wouldn't download the shell script and use the value of argument *shell_path* directly as shell script path to run."
32+
type: boolean
33+
required: false
34+
default: false
2835
outputs:
2936
all_test_items:
3037
description: "The output string about all test items it needs to run."
@@ -40,6 +47,11 @@ jobs:
4047
matrix: ${{ steps.set-matrix.outputs.all_test_items }}
4148
steps:
4249
- uses: actions/checkout@v3
50+
51+
- name: Download shell script for getting path of all test modules
52+
if: ${{ inputs.use_customized_shell != true }}
53+
run: curl https://raw.githubusercontent.com/Chisanan232/GitHub-Action_Reusable_Workflows-Python/develop/scripts/ci/get-all-tests.sh --output ${{ inputs.shell_path }}
54+
4355
- id: set-matrix
4456
run: |
4557
sudo apt-get install jq

0 commit comments

Comments
 (0)