diff --git a/.github/workflows/rw_poetry_run_test.yaml b/.github/workflows/rw_poetry_run_test.yaml index 20c02549..e2923f16 100644 --- a/.github/workflows/rw_poetry_run_test.yaml +++ b/.github/workflows/rw_poetry_run_test.yaml @@ -5,6 +5,8 @@ # coverage report (it would save reports by 'actions/upload-artifact@v3'). # # Workflow input parameters: +# * runtime_os: The OS to use for runtime environment. In default, it's 'ubuntu-latest'. +# * python_version: The Python version to run the workflow. In default, it's Python version '3.11'. # * test_type: The testing type. In generally, it only has 2 options: 'unit-test' and 'integration-test'. # * all_test_items_paths: The target paths of test items under test. # * setup_http_server: If it's true, it would set up and run HTTP server for testing. @@ -29,6 +31,16 @@ name: Run test items via PyTest on: workflow_call: inputs: + runtime_os: + description: "The OS to use for runtime environment. In default, it's 'ubuntu-latest'." + required: false + type: string + default: ubuntu-latest + python_version: + description: "The Python version to run the workflow. In default, it's Python version '3.11'." + required: false + type: string + default: 3.11 test_type: description: "The testing type. In generally, it only has 2 options: 'unit-test' and 'integration-test'." required: true @@ -68,23 +80,19 @@ on: jobs: run_test_items: - if: ${{ inputs.debug_mode == false }} - runs-on: ${{ matrix.os }} + runs-on: ${{ inputs.runtime_os }} strategy: matrix: - python-version: [3.8,3.9,'3.10','3.11'] - os: [ubuntu-20.04,ubuntu-latest,macos-latest] test-path: ${{fromJson(inputs.all_test_items_paths)}} - steps: - uses: actions/checkout@v4 - - name: Install Python ${{ matrix.python-version }} + - name: Install Python ${{ inputs.python_version }} uses: actions/setup-python@v5 with: - python-version: ${{ matrix.python-version }} + python-version: ${{ inputs.python_version }} - name: Install Python dependencies run: | @@ -112,11 +120,11 @@ jobs: continue-on-error: true - name: Rename the code coverage result file - run: mv ./.coverage ./.coverage.${{ inputs.test_type }}.${{ matrix.os }}-${{ matrix.python-version }} + run: mv ./.coverage ./.coverage.${{ inputs.test_type }}.${{ inputs.runtime_os }}-${{ inputs.python_version }} - name: Upload code coverage result file uses: actions/upload-artifact@v3 with: name: coverage - path: .coverage.${{ inputs.test_type }}.${{ matrix.os }}-${{ matrix.python-version }} + path: .coverage.${{ inputs.test_type }}.${{ inputs.runtime_os }}-${{ inputs.python_version }} if-no-files-found: error diff --git a/.github/workflows/rw_poetry_run_test_with_multi_py_versions.yaml b/.github/workflows/rw_poetry_run_test_with_multi_py_versions.yaml new file mode 100644 index 00000000..92976ade --- /dev/null +++ b/.github/workflows/rw_poetry_run_test_with_multi_py_versions.yaml @@ -0,0 +1,87 @@ +################################################################################################################################# +# +# Workflow Description: +# Use Poetry to 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'). +# +# Workflow input parameters: +# * test_type: The testing type. In generally, it only has 2 options: 'unit-test' and 'integration-test'. +# * all_test_items_paths: The target paths of test items under test. +# * setup_http_server: If it's true, it would set up and run HTTP server for testing. +# * http_server_host: The host IPv4 address of HTTP server. +# * http_server_port: The port number of HTTP server. +# * http_server_app_module: The module path of HTTP server. +# * http_server_enter_point: The object about the web application. +# +# Workflow running output: +# No, but it would save the testing coverage reports to provide after-process to organize and record. +# +# * Upload-Artifact: +# * coverage: The test coverage report which be generated by PyTest, and it's recorded after run test done. +# The file name format would be .coverage..- +# +################################################################################################################################# + +name: Run test items via PyTest + +# TODO: Run Python package test via Poetry. + +on: + workflow_call: + inputs: + test_type: + description: "The testing type. In generally, it only has 2 options: 'unit-test' and 'integration-test'." + required: true + type: string + all_test_items_paths: + description: "The target paths of test items under test." + required: true + type: string + setup_http_server: + description: "If it's true, it would set up and run HTTP server for testing." + type: boolean + required: false + default: false + http_server_host: + description: "The host IPv4 address of HTTP server." + type: string + required: false + default: 0.0.0.0 + http_server_port: + description: "The port number of HTTP server." + type: string + required: false + default: 12345 + http_server_app_module: + description: "The module path of HTTP server." + type: string + required: false + default: app + http_server_enter_point: + description: "The object about the web application." + type: string + required: false + default: app + +# TODO: Add a reusable workflow about running test via Poetry +# TODO: https://github.com/marketplace/actions/python-poetry-action + +jobs: + run_test_items: + strategy: + matrix: + python-version: [3.8,3.9,'3.10','3.11'] + os: [ubuntu-20.04,ubuntu-latest,macos-latest] + test-path: ${{fromJson(inputs.all_test_items_paths)}} + + uses: ./.github/workflows/rw_poetry_run_test.yaml + with: + runtime_os: ${{ matrix.os }} + python_version: ${{ matrix.python-version }} + test_type: ${{ inputs.test_type }} + all_test_items_paths: ${{ inputs.all_test_items_paths }} + setup_http_server: ${{ inputs.setup_http_server }} + http_server_host: ${{ inputs.http_server_host }} + http_server_port: ${{ inputs.http_server_port }} + http_server_app_module: ${{ inputs.http_server_app_module }} + http_server_enter_point: ${{ inputs.http_server_enter_point }} diff --git a/.github/workflows/rw_run_test.yaml b/.github/workflows/rw_run_test.yaml index ccc918f2..65c50a9f 100644 --- a/.github/workflows/rw_run_test.yaml +++ b/.github/workflows/rw_run_test.yaml @@ -5,6 +5,8 @@ # coverage report (it would save reports by 'actions/upload-artifact@v3'). # # Workflow input parameters: +# * runtime_os: The OS to use for runtime environment. In default, it's 'ubuntu-latest'. +# * python_version: The Python version to run the workflow. In default, it's Python version '3.11'. # * test_type: The testing type. In generally, it only has 2 options: 'unit-test' and 'integration-test'. # * all_test_items_paths: The target paths of test items under test. # * setup_http_server: If it's true, it would set up and run HTTP server for testing. @@ -12,7 +14,6 @@ # * http_server_port: The port number of HTTP server. # * http_server_app_module: The module path of HTTP server. # * http_server_enter_point: The object about the web application. -# * debug_mode: For debug, so it's matrix would one has os: ubuntu-22.04 & python-version: '3.10'. # # Workflow running output: # No, but it would save the testing coverage reports to provide after-process to organize and record. @@ -28,6 +29,16 @@ name: Run test items via PyTest on: workflow_call: inputs: + runtime_os: + description: "The OS to use for runtime environment. In default, it's 'ubuntu-latest'." + required: false + type: string + default: ubuntu-latest + python_version: + description: "The Python version to run the workflow. In default, it's Python version '3.11'." + required: false + type: string + default: 3.11 test_type: description: "The testing type. In generally, it only has 2 options: 'unit-test' and 'integration-test'." required: true @@ -61,93 +72,23 @@ on: type: string required: false default: app - debug_mode: - description: "For debug, so it's matrix would one has os: ubuntu-22.04 & python-version: '3.10'." - type: boolean - required: false - default: false jobs: run_test_items: - if: ${{ inputs.debug_mode == false }} - runs-on: ${{ matrix.os }} - - strategy: - matrix: - python-version: [3.6,3.7,3.8,3.9,'3.10','3.11'] - os: [ubuntu-20.04,ubuntu-latest,macos-latest] - exclude: - - os: ubuntu-latest - python-version: 3.6 - - os: ubuntu-20.04 - python-version: 3.7 - - os: ubuntu-20.04 - python-version: 3.8 - - os: ubuntu-20.04 - python-version: 3.9 - - os: ubuntu-20.04 - python-version: '3.10' - - os: ubuntu-20.04 - python-version: 3.11 - test-path: ${{fromJson(inputs.all_test_items_paths)}} - - - steps: - - uses: actions/checkout@v4 - - - name: Install Python ${{ matrix.python-version }} - uses: actions/setup-python@v5 - with: - python-version: ${{ matrix.python-version }} - - - name: Install Python dependencies - run: | - python -m pip install --upgrade pip - pip install -U pip - pip install -U -r ./requirements/requirements.txt - pip install -U -r ./requirements/requirements-test.txt - - - name: Setup and run HTTP server for testing - if: ${{ inputs.setup_http_server == true }} - run: gunicorn --bind ${{ inputs.http_server_host }}:${{ inputs.http_server_port }} '${{ inputs.http_server_app_module }}:${{ inputs.http_server_enter_point }}' --daemon - - - name: Test to send HTTP request to sample HTTP server - if: ${{ inputs.setup_http_server == true }} - run: curl "http://${{ inputs.http_server_host }}:${{ inputs.http_server_port }}/exchangeReport/STOCK_DAY?response=json&date=20170101&stockNo=2331" - - - name: Run tests with pytest - run: pytest ${{ matrix.test-path }} - continue-on-error: true - - - name: Rename the code coverage result file - run: mv ./.coverage ./.coverage.${{ inputs.test_type }}.${{ matrix.os }}-${{ matrix.python-version }} - - - name: Upload code coverage result file - uses: actions/upload-artifact@v3 - with: - name: coverage - path: .coverage.${{ inputs.test_type }}.${{ matrix.os }}-${{ matrix.python-version }} - if-no-files-found: error - - - run_test_items_with_debug_mode: - if: ${{ inputs.debug_mode == true }} - runs-on: ${{ matrix.os }} + runs-on: ${{ inputs.runtime_os }} strategy: matrix: - python-version: ['3.10'] - os: [ubuntu-22.04] test-path: ${{fromJson(inputs.all_test_items_paths)}} steps: - uses: actions/checkout@v4 - - name: Install Python ${{ matrix.python-version }} + - name: Install Python ${{ inputs.python_version }} uses: actions/setup-python@v5 with: - python-version: ${{ matrix.python-version }} + python-version: ${{ inputs.python_version }} - name: Install Python dependencies run: | @@ -169,11 +110,11 @@ jobs: continue-on-error: true - name: Rename the code coverage result file - run: mv ./.coverage ./.coverage.${{ inputs.test_type }}.${{ matrix.os }}-${{ matrix.python-version }} + run: mv ./.coverage ./.coverage.${{ inputs.test_type }}.${{ inputs.runtime_os }}-${{ inputs.python_version }} - name: Upload code coverage result file uses: actions/upload-artifact@v3 with: name: coverage - path: .coverage.${{ inputs.test_type }}.${{ matrix.os }}-${{ matrix.python-version }} + path: .coverage.${{ inputs.test_type }}.${{ inputs.runtime_os }}-${{ inputs.python_version }} if-no-files-found: error diff --git a/.github/workflows/rw_run_test_with_multi_py_versions.yaml b/.github/workflows/rw_run_test_with_multi_py_versions.yaml new file mode 100644 index 00000000..7390b781 --- /dev/null +++ b/.github/workflows/rw_run_test_with_multi_py_versions.yaml @@ -0,0 +1,96 @@ +################################################################################################################################# +# +# Workflow 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'). +# +# Workflow input parameters: +# * test_type: The testing type. In generally, it only has 2 options: 'unit-test' and 'integration-test'. +# * all_test_items_paths: The target paths of test items under test. +# * setup_http_server: If it's true, it would set up and run HTTP server for testing. +# * http_server_host: The host IPv4 address of HTTP server. +# * http_server_port: The port number of HTTP server. +# * http_server_app_module: The module path of HTTP server. +# * http_server_enter_point: The object about the web application. +# +# Workflow running output: +# No, but it would save the testing coverage reports to provide after-process to organize and record. +# +# * Upload-Artifact: +# * coverage: The test coverage report which be generated by PyTest, and it's recorded after run test done. +# The file name format would be .coverage..- +# +################################################################################################################################# + +name: Run test items via PyTest + +on: + workflow_call: + inputs: + test_type: + description: "The testing type. In generally, it only has 2 options: 'unit-test' and 'integration-test'." + required: true + type: string + all_test_items_paths: + description: "The target paths of test items under test." + required: true + type: string + setup_http_server: + description: "If it's true, it would set up and run HTTP server for testing." + type: boolean + required: false + default: false + http_server_host: + description: "The host IPv4 address of HTTP server." + type: string + required: false + default: 0.0.0.0 + http_server_port: + description: "The port number of HTTP server." + type: string + required: false + default: 12345 + http_server_app_module: + description: "The module path of HTTP server." + type: string + required: false + default: app + http_server_enter_point: + description: "The object about the web application." + type: string + required: false + default: app + + +jobs: + run_test_items: + strategy: + matrix: + python-version: [3.6,3.7,3.8,3.9,'3.10','3.11'] + os: [ubuntu-20.04,ubuntu-latest,macos-latest] + exclude: + - os: ubuntu-latest + python-version: 3.6 + - os: ubuntu-20.04 + python-version: 3.7 + - os: ubuntu-20.04 + python-version: 3.8 + - os: ubuntu-20.04 + python-version: 3.9 + - os: ubuntu-20.04 + python-version: '3.10' + - os: ubuntu-20.04 + python-version: 3.11 + test-path: ${{fromJson(inputs.all_test_items_paths)}} + + uses: ./.github/workflows/rw_run_test.yaml + with: + runtime_os: ${{ matrix.os }} + python_version: ${{ matrix.python-version }} + test_type: ${{ inputs.test_type }} + all_test_items_paths: ${{ inputs.all_test_items_paths }} + setup_http_server: ${{ inputs.setup_http_server }} + http_server_host: ${{ inputs.http_server_host }} + http_server_port: ${{ inputs.http_server_port }} + http_server_app_module: ${{ inputs.http_server_app_module }} + http_server_enter_point: ${{ inputs.http_server_enter_point }} diff --git a/.github/workflows/test_pyproject_ci_multi-tests_by_poetry.yaml b/.github/workflows/test_pyproject_ci_multi-tests_by_poetry.yaml index bccba2d3..5ed43df0 100644 --- a/.github/workflows/test_pyproject_ci_multi-tests_by_poetry.yaml +++ b/.github/workflows/test_pyproject_ci_multi-tests_by_poetry.yaml @@ -23,6 +23,7 @@ on: # The shell scripts or actions this workflow would use. - ".github/workflows/rw_get_tests.yaml" - ".github/workflows/rw_poetry_run_test.yaml" + - ".github/workflows/rw_poetry_run_test_with_multi_py_versions.yaml" - ".github/workflows/rw_organize_test_cov_reports.yaml" - "scripts/ci/combine_coverage_reports.sh" - ".github/workflows/rw_upload_test_cov_report.yaml" @@ -55,6 +56,7 @@ on: # The shell scripts or actions this workflow would use. - ".github/workflows/rw_get_tests.yaml" - ".github/workflows/rw_poetry_run_test.yaml" + - ".github/workflows/rw_poetry_run_test_with_multi_py_versions.yaml" - ".github/workflows/rw_organize_test_cov_reports.yaml" - "scripts/ci/combine_coverage_reports.sh" - ".github/workflows/rw_upload_test_cov_report.yaml" @@ -94,7 +96,7 @@ jobs: run_integration-test: # name: Run all integration test items. This testing would test the code with other resource or system to ensure the features work finely. needs: prep-testbed_integration-test - uses: ./.github/workflows/rw_poetry_run_test.yaml + uses: ./.github/workflows/rw_poetry_run_test_with_multi_py_versions.yaml with: test_type: integration-test all_test_items_paths: ${{needs.prep-testbed_integration-test.outputs.all_test_items}} diff --git a/.github/workflows/test_python_project_ci_multi-tests.yaml b/.github/workflows/test_python_project_ci_multi-tests.yaml index a907a695..55b83ded 100644 --- a/.github/workflows/test_python_project_ci_multi-tests.yaml +++ b/.github/workflows/test_python_project_ci_multi-tests.yaml @@ -23,7 +23,8 @@ on: - "test/**" # The shell scripts or actions this workflow would use. - ".github/workflows/rw_get_tests.yaml" - - ".github/workflows/rw_poetry_run_test.yaml" + - ".github/workflows/rw_run_test.yaml" + - ".github/workflows/rw_run_test_with_multi_py_versions.yaml" - ".github/workflows/rw_organize_test_cov_reports.yaml" - "scripts/ci/combine_coverage_reports.sh" - ".github/workflows/rw_upload_test_cov_report.yaml" @@ -56,7 +57,8 @@ on: - "test/**" # The shell scripts or actions this workflow would use. - ".github/workflows/rw_get_tests.yaml" - - ".github/workflows/rw_poetry_run_test.yaml" + - ".github/workflows/rw_run_test.yaml" + - ".github/workflows/rw_run_test_with_multi_py_versions.yaml" - ".github/workflows/rw_organize_test_cov_reports.yaml" - "scripts/ci/combine_coverage_reports.sh" - ".github/workflows/rw_upload_test_cov_report.yaml" @@ -89,9 +91,9 @@ jobs: needs: prep-testbed_unit-test uses: ./.github/workflows/rw_run_test.yaml with: + python_version: '3.10' test_type: unit-test all_test_items_paths: ${{needs.prep-testbed_unit-test.outputs.all_test_items}} - debug_mode: true run_integration-test: @@ -106,7 +108,6 @@ jobs: http_server_port: 30303 http_server_app_module: test._http_server.app http_server_enter_point: app - debug_mode: true all-test_codecov: diff --git a/.github/workflows/test_python_project_ci_one-test.yaml b/.github/workflows/test_python_project_ci_one-test.yaml index 59a0e8ed..89b53768 100644 --- a/.github/workflows/test_python_project_ci_one-test.yaml +++ b/.github/workflows/test_python_project_ci_one-test.yaml @@ -23,7 +23,8 @@ on: - "test/**" # The shell scripts or actions this workflow would use. - ".github/workflows/rw_get_tests.yaml" - - ".github/workflows/rw_poetry_run_test.yaml" + - ".github/workflows/rw_run_test.yaml" + - ".github/workflows/rw_run_test_with_multi_py_versions.yaml" - ".github/workflows/rw_organize_test_cov_reports.yaml" - "scripts/ci/combine_coverage_reports.sh" - ".github/workflows/rw_upload_test_cov_report.yaml" @@ -56,7 +57,8 @@ on: - "test/**" # The shell scripts or actions this workflow would use. - ".github/workflows/rw_get_tests.yaml" - - ".github/workflows/rw_poetry_run_test.yaml" + - ".github/workflows/rw_run_test.yaml" + - ".github/workflows/rw_run_test_with_multi_py_versions.yaml" - ".github/workflows/rw_organize_test_cov_reports.yaml" - "scripts/ci/combine_coverage_reports.sh" - ".github/workflows/rw_upload_test_cov_report.yaml" @@ -78,11 +80,10 @@ jobs: run_unit-test: # name: Run all unit test items needs: prep-testbed_unit-test - uses: ./.github/workflows/rw_run_test.yaml + uses: ./.github/workflows/rw_run_test_with_multi_py_versions.yaml with: test_type: unit-test all_test_items_paths: ${{needs.prep-testbed_unit-test.outputs.all_test_items}} -# debug_mode: true unit-test_codecov: diff --git a/README.md b/README.md index 034322a4..373617fe 100644 --- a/README.md +++ b/README.md @@ -36,6 +36,8 @@ The usage of each workflow template. * [_rw_get_tests.yaml_](#rw_get_testsyaml) * [_rw_run_test.yaml_](#rw_run_testyaml) * [_rw_poetry_run_test.yaml_](#rw_poetry_run_testyaml) +* [_rw_run_test_with_multi_py_versions.yaml_](#rw_run_test_with_multi_py_versionsyaml) +* [_rw_poetry_run_test_with_multi_py_versions.yaml_](#rw_poetry_run_test_with_multi_py_versionsyaml) * [_rw_organize_test_cov_reports.yaml_](#rw_organize_test_cov_reportsyaml) * [_rw_upload_test_cov_report.yaml_](#rw_upload_test_cov_reportyaml) * [_rw_pre-building_test.yaml_](#rw_pre-building_testyaml) @@ -95,19 +97,21 @@ The usage of each workflow template. ### _rw_run_test.yaml_ -* 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_). +* 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_). * Options: -| option name | data type | optional or required | function content | -|-------------------------|-----------|--------------------------------------|--------------------------------------------------------------------------------------------| -| test_type | string | Required | The testing type. In generally, it only has 2 options: _unit-test_ and _integration-test_. | -| all_test_items_paths | string | Required | The target paths of test items under test. | -| setup_http_server | string | Optional, Default value is _false_ | If it's true, it would set up and run HTTP server for testing. | -| http_server_host | string | Optional, Default value is _0.0.0.0_ | The host IPv4 address of HTTP server. | -| http_server_port | string | Optional, Default value is _12345_ | The port number of HTTP server. | -| http_server_app_module | string | Optional, Default value is _app_ | The module path of HTTP server. | -| http_server_enter_point | string | Optional, Default value is _app_ | The object about the web application. | -| 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. | +| option name | data type | optional or required | function content | +|-------------------------|-----------|--------------------------------------------|--------------------------------------------------------------------------------------------| +| runtime_os | string | Optional, Default value is _ubuntu-latest_ | The OS to use for runtime environment. | +| python_version | string | Optional, Default value is _3.11_ | The Python version to run the test in workflow. | +| test_type | string | Required | The testing type. In generally, it only has 2 options: _unit-test_ and _integration-test_. | +| all_test_items_paths | string | Required | The target paths of test items under test. | +| setup_http_server | string | Optional, Default value is _false_ | If it's true, it would set up and run HTTP server for testing. | +| http_server_host | string | Optional, Default value is _0.0.0.0_ | The host IPv4 address of HTTP server. | +| http_server_port | string | Optional, Default value is _12345_ | The port number of HTTP server. | +| http_server_app_module | string | Optional, Default value is _app_ | The module path of HTTP server. | +| http_server_enter_point | string | Optional, Default value is _app_ | The object about the web application. | +| 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. | * Output: @@ -125,6 +129,7 @@ No, but it would save the testing coverage reports to provide after-process to o needs: prepare-testing-items_unit-test uses: Chisanan232/GitHub-Action-Template-Python/.github/workflows/rw_run_test.yaml@master with: + python_version: '3.10' test_type: unit-test all_test_items_paths: ${{needs.prepare-testing-items_unit-test.outputs.all_test_items}} setup_http_server: true @@ -149,14 +154,7 @@ is provided by previous workflow? That is all testing items. > It also has another reusable workflow names _poetry_run_test_via_pytest.yaml_. If your Python project manages by **Poetry**, > it recommends you to use this one replaces _rw_run_test.yaml_. The usage and running details are mostly same > as _rw_run_test.yaml_. But, workflow _poetry_run_test_via_pytest.yaml_ only supports Python version 3.8 up. -> - -* Difference between workflows _rw_run_test.yaml_ and _poetry_run_test_via_pytest.yaml_ - -| Workflow | Running way | Support Python version | -|-----------------------------------|---------------------------------------------------|------------------------| -| _rw_run_test.yaml_ | Command lines like ``pip``, ``python``, etc | 3.6 - 3.11 | -| _poetry_run_test_via_pytest.yaml_ | Use ``poetry`` feature or run command lines in it | 3.8 - 3.11 | +>
@@ -165,12 +163,42 @@ is provided by previous workflow? That is all testing items. * Description: Same working with workflow _rw_run_test.yaml_, but this workflow would run test via **_Poetry_**. +* Difference between workflows _rw_run_test.yaml_ and _poetry_run_test_via_pytest.yaml_: + +| Workflow | Running way | +|-----------------------------------|---------------------------------------------------| +| _rw_run_test.yaml_ | Command lines like ``pip``, ``python``, etc | +| _poetry_run_test_via_pytest.yaml_ | Use ``poetry`` feature or run command lines in it | + + +
+ +### _rw_run_test_with_multi_py_versions.yaml_ + +* Description: Almost same working with workflow _rw_run_test.yaml_, but it would run test with multiple Python versions +with multiple runtime environment OS. + + +
+ +### _rw_poetry_run_test_with_multi_py_versions.yaml_ + +* Description: Almost same working with workflow _rw_poetry_run_test.yaml_, but it would run test with multiple Python versions +with multiple runtime environment OS. + +* Difference between workflows _rw_run_test_with_multi_py_version.yaml_ and _rw_poetry_run_test_with_multi_py_versions.yaml_ + + | Workflow | Running way | Support Python version | + |--------------------------------------------------|---------------------------------------------------|------------------------| + | _rw_run_test_with_multi_py_version.yaml_ | Command lines like ``pip``, ``python``, etc | 3.6 - 3.11 | + | _rw_poetry_run_test_with_multi_py_versions.yaml_ | Use ``poetry`` feature or run command lines in it | 3.8 - 3.11 | +
### _rw_organize_test_cov_reports.yaml_ -* 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_). +* 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_). * Options: | 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 test_type: unit-test ``` -It would upload the organized report via _actions/upload-artifact@v3_. And it doesn't support customize options of _actions/upload-artifact@v3_ currently. +It would upload the organized report via _actions/upload-artifact_. And it doesn't support customize options of _actions/upload-artifact_ currently.
@@ -212,7 +240,7 @@ _General option_: | option name | data type | optional or required | function content | |---------------------|-----------|------------------------------------------|---------------------------------------------------------------------------------------------------------------------| -| download_path | string | Optional. Default value is './'. | The path to download testing coverage reports via _actions/download-artifact@v3_. | +| download_path | string | Optional. Default value is './'. | The path to download testing coverage reports via _actions/download-artifact_. | | test_type | string | Required | The testing type. In generally, it only has 3 options: _unit-test_, _integration-test_ and _all-type_. | | upload-to-codecov | boolean | Optional. Default value is _false_. | If it's true, it would upload testing coverage report for Codecov (https://codecov.io). | | 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. |