Skip to content

Commit 97d94f9

Browse files
committed
✏️ Update the usage to get all tests in README.
1 parent eb121e6 commit 97d94f9

File tree

1 file changed

+32
-14
lines changed

1 file changed

+32
-14
lines changed

README.md

Lines changed: 32 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -44,28 +44,46 @@ The usage of each workflow template.
4444
* Description: Prepare the test items.
4545
* Options:
4646

47-
| option name | data type | optional or required | function content |
48-
|-------------|-----------|----------------------|------------------------------------------------------|
49-
| shell_path | string | Required | The path shell script for getting the testing items. |
50-
| shell_arg | string | Required | Input arguments of the shell script. |
47+
| option name | data type | optional or required | function content |
48+
|----------------------|-----------|------------------------------------------------------------|-----------------------------------------------------------|
49+
| shell_path | string | Optional, Default value is _./scripts/ci/get-all-tests.sh_ | The path shell script for getting the testing items. |
50+
| shell_arg | string | Required | Input arguments of the shell script. |
51+
| use_customized_shell | boolean | Optional, Default value is _false_ | Whether it should use the customized shell script or not. |
5152

5253
* Output:
5354
* all_test_items: All the test items it would run.
5455

5556
* How to use it?
5657

57-
Before use this workflow, it should prepare a shell script for getting the testing items.
58+
* Use default shell script (recommended)
5859

59-
```yaml
60-
prepare-testing-items_unit-test:
61-
# name: Prepare all unit test items
62-
uses: Chisanan232/GitHub-Action-Template-Python/.github/workflows/rw_get_tests.yaml@master
63-
with:
64-
shell_path: scripts/ci/get-unit-test-paths.sh
65-
shell_arg: unix
66-
```
60+
If we want to use default shell script to auto-scan all tests, it only needs to give a shell script argument which is the directory path of test code:
61+
62+
```yaml
63+
prepare-testing-items_unit-test:
64+
# name: Prepare all unit test items
65+
uses: Chisanan232/GitHub-Action-Template-Python/.github/workflows/rw_get_tests.yaml@master
66+
with:
67+
shell_arg: test/unit_test/
68+
```
69+
70+
And it would get all tests you need. And the keyword to get this workflow output result is _all_test_items_.
71+
72+
* Use customized shell script
73+
74+
Before use this workflow, it should prepare a shell script for getting the testing items.
75+
76+
```yaml
77+
prepare-testing-items_unit-test:
78+
# name: Prepare all unit test items
79+
uses: Chisanan232/GitHub-Action-Template-Python/.github/workflows/rw_get_tests.yaml@master
80+
with:
81+
shell_path: scripts/ci/get-unit-test-paths.sh
82+
shell_arg: unix
83+
use_customized_shell: true
84+
```
6785
68-
And we could get this workflow output result via keyword _all_test_items_.
86+
And we could get this workflow output result via keyword _all_test_items_.
6987
7088
<hr>
7189

0 commit comments

Comments
 (0)