Skip to content

Commit 7890c6a

Browse files
committed
✏️ Update document content with the new features and changes.
1 parent 983206d commit 7890c6a

File tree

1 file changed

+50
-22
lines changed

1 file changed

+50
-22
lines changed

README.md

Lines changed: 50 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,8 @@ The usage of each workflow template.
3636
* [_rw_get_tests.yaml_](#rw_get_testsyaml)
3737
* [_rw_run_test.yaml_](#rw_run_testyaml)
3838
* [_rw_poetry_run_test.yaml_](#rw_poetry_run_testyaml)
39+
* [_rw_run_test_with_multi_py_versions.yaml_](#rw_run_test_with_multi_py_versionsyaml)
40+
* [_rw_poetry_run_test_with_multi_py_versions.yaml_](#rw_poetry_run_test_with_multi_py_versionsyaml)
3941
* [_rw_organize_test_cov_reports.yaml_](#rw_organize_test_cov_reportsyaml)
4042
* [_rw_upload_test_cov_report.yaml_](#rw_upload_test_cov_reportyaml)
4143
* [_rw_pre-building_test.yaml_](#rw_pre-building_testyaml)
@@ -95,19 +97,21 @@ The usage of each workflow template.
9597
9698
### _rw_run_test.yaml_
9799
98-
* Description: Run testing by specific type with all test items via PyTest and generate its testing coverage report (it would save reports by _actions/upload-artifact@v3_).
100+
* Description: Run testing by specific type with all test items via PyTest and generate its testing coverage report (it would save reports by _actions/upload-artifact_).
99101
* Options:
100102
101-
| option name | data type | optional or required | function content |
102-
|-------------------------|-----------|--------------------------------------|--------------------------------------------------------------------------------------------|
103-
| test_type | string | Required | The testing type. In generally, it only has 2 options: _unit-test_ and _integration-test_. |
104-
| all_test_items_paths | string | Required | The target paths of test items under test. |
105-
| setup_http_server | string | Optional, Default value is _false_ | If it's true, it would set up and run HTTP server for testing. |
106-
| http_server_host | string | Optional, Default value is _0.0.0.0_ | The host IPv4 address of HTTP server. |
107-
| http_server_port | string | Optional, Default value is _12345_ | The port number of HTTP server. |
108-
| http_server_app_module | string | Optional, Default value is _app_ | The module path of HTTP server. |
109-
| http_server_enter_point | string | Optional, Default value is _app_ | The object about the web application. |
110-
| debug_mode | boolean | Optional, Default value is _false_ | For debug, so it's matrix would only has one os: ubuntu-22.04 & one python-version: 3.10. |
103+
| option name | data type | optional or required | function content |
104+
|-------------------------|-----------|--------------------------------------------|--------------------------------------------------------------------------------------------|
105+
| runtime_os | string | Optional, Default value is _ubuntu-latest_ | The OS to use for runtime environment. |
106+
| python_version | string | Optional, Default value is _3.11_ | The Python version to run the test in workflow. |
107+
| test_type | string | Required | The testing type. In generally, it only has 2 options: _unit-test_ and _integration-test_. |
108+
| all_test_items_paths | string | Required | The target paths of test items under test. |
109+
| setup_http_server | string | Optional, Default value is _false_ | If it's true, it would set up and run HTTP server for testing. |
110+
| http_server_host | string | Optional, Default value is _0.0.0.0_ | The host IPv4 address of HTTP server. |
111+
| http_server_port | string | Optional, Default value is _12345_ | The port number of HTTP server. |
112+
| http_server_app_module | string | Optional, Default value is _app_ | The module path of HTTP server. |
113+
| http_server_enter_point | string | Optional, Default value is _app_ | The object about the web application. |
114+
| debug_mode | boolean | Optional, Default value is _false_ | For debug, so it's matrix would only has one os: ubuntu-22.04 & one python-version: 3.10. |
111115
112116
* Output:
113117
@@ -125,6 +129,7 @@ No, but it would save the testing coverage reports to provide after-process to o
125129
needs: prepare-testing-items_unit-test
126130
uses: Chisanan232/GitHub-Action-Template-Python/.github/workflows/rw_run_test.yaml@master
127131
with:
132+
python_version: '3.10'
128133
test_type: unit-test
129134
all_test_items_paths: ${{needs.prepare-testing-items_unit-test.outputs.all_test_items}}
130135
setup_http_server: true
@@ -149,14 +154,7 @@ is provided by previous workflow? That is all testing items.
149154
> It also has another reusable workflow names _poetry_run_test_via_pytest.yaml_. If your Python project manages by **Poetry**,
150155
> it recommends you to use this one replaces _rw_run_test.yaml_. The usage and running details are mostly same
151156
> as _rw_run_test.yaml_. But, workflow _poetry_run_test_via_pytest.yaml_ only supports Python version 3.8 up.
152-
>
153-
154-
* Difference between workflows _rw_run_test.yaml_ and _poetry_run_test_via_pytest.yaml_
155-
156-
| Workflow | Running way | Support Python version |
157-
|-----------------------------------|---------------------------------------------------|------------------------|
158-
| _rw_run_test.yaml_ | Command lines like ``pip``, ``python``, etc | 3.6 - 3.11 |
159-
| _poetry_run_test_via_pytest.yaml_ | Use ``poetry`` feature or run command lines in it | 3.8 - 3.11 |
157+
>
160158
161159
162160
<hr>
@@ -165,12 +163,42 @@ is provided by previous workflow? That is all testing items.
165163
166164
* Description: Same working with workflow _rw_run_test.yaml_, but this workflow would run test via **_Poetry_**.
167165
166+
* Difference between workflows _rw_run_test.yaml_ and _poetry_run_test_via_pytest.yaml_:
167+
168+
| Workflow | Running way |
169+
|-----------------------------------|---------------------------------------------------|
170+
| _rw_run_test.yaml_ | Command lines like ``pip``, ``python``, etc |
171+
| _poetry_run_test_via_pytest.yaml_ | Use ``poetry`` feature or run command lines in it |
172+
173+
174+
<hr>
175+
176+
### _rw_run_test_with_multi_py_versions.yaml_
177+
178+
* Description: Almost same working with workflow _rw_run_test.yaml_, but it would run test with multiple Python versions
179+
with multiple runtime environment OS.
180+
181+
182+
<hr>
183+
184+
### _rw_poetry_run_test_with_multi_py_versions.yaml_
185+
186+
* Description: Almost same working with workflow _rw_poetry_run_test.yaml_, but it would run test with multiple Python versions
187+
with multiple runtime environment OS.
188+
189+
* Difference between workflows _rw_run_test_with_multi_py_version.yaml_ and _rw_poetry_run_test_with_multi_py_versions.yaml_
190+
191+
| Workflow | Running way | Support Python version |
192+
|--------------------------------------------------|---------------------------------------------------|------------------------|
193+
| _rw_run_test_with_multi_py_version.yaml_ | Command lines like ``pip``, ``python``, etc | 3.6 - 3.11 |
194+
| _rw_poetry_run_test_with_multi_py_versions.yaml_ | Use ``poetry`` feature or run command lines in it | 3.8 - 3.11 |
195+
168196
169197
<hr>
170198
171199
### _rw_organize_test_cov_reports.yaml_
172200
173-
* Description: Organize all the testing coverage reports which be generated in different runtime OS with Python version. (it would save reports by _actions/upload-artifact@v3_).
201+
* Description: Organize all the testing coverage reports which be generated in different runtime OS with Python version. (it would save reports by _actions/upload-artifact_).
174202
* Options:
175203
176204
| option name | data type | optional or required | function content |
@@ -197,7 +225,7 @@ No, but it would save the testing coverage reports to provide after-process to o
197225
test_type: unit-test
198226
```
199227
200-
It would upload the organized report via _actions/upload-artifact@v3_. And it doesn't support customize options of _actions/upload-artifact@v3_ currently.
228+
It would upload the organized report via _actions/upload-artifact_. And it doesn't support customize options of _actions/upload-artifact_ currently.
201229
202230
<hr>
203231
@@ -212,7 +240,7 @@ _General option_:
212240
213241
| option name | data type | optional or required | function content |
214242
|---------------------|-----------|------------------------------------------|---------------------------------------------------------------------------------------------------------------------|
215-
| download_path | string | Optional. Default value is './'. | The path to download testing coverage reports via _actions/download-artifact@v3_. |
243+
| download_path | string | Optional. Default value is './'. | The path to download testing coverage reports via _actions/download-artifact_. |
216244
| test_type | string | Required | The testing type. In generally, it only has 3 options: _unit-test_, _integration-test_ and _all-type_. |
217245
| upload-to-codecov | boolean | Optional. Default value is _false_. | If it's true, it would upload testing coverage report for Codecov (https://codecov.io). |
218246
| codecov_flags | string | Optional. Default value is empty string. | The flags of the testing coverage report for Codecov. This option would be required if _upload-to-codecov_ is true. |

0 commit comments

Comments
 (0)