diff --git a/.github/workflows/organize_all_testing_coverage_reports_with_different_os_and_py_version.yaml b/.github/workflows/organize_all_testing_coverage_reports_with_different_os_and_py_version.yaml index 695fe581..96dcad58 100644 --- a/.github/workflows/organize_all_testing_coverage_reports_with_different_os_and_py_version.yaml +++ b/.github/workflows/organize_all_testing_coverage_reports_with_different_os_and_py_version.yaml @@ -5,6 +5,8 @@ # # Workflow input parameters: # * test_type: The testing type. In generally, it only has 2 options: 'unit-test' and 'integration-test'. +# * generate_xml_report_finally: Something, it only has 1 test type currently. So it could let this option +# to be 'true' than it would generate XML report finally to let uploading process to use it directly. # # Workflow running output: # No, but it would save the testing coverage reports (coverage.xml) to provide after-process to organize and record. @@ -20,6 +22,10 @@ on: description: "The testing type. In generally, it only has 2 options: 'unit-test' and 'integration-test'." required: true type: string + generate_xml_report_finally: + description: "Something, it only has 1 test type currently. So it could let this option to be 'true' than it would generate XML report finally to let uploading process to use it directly." + required: true + type: boolean jobs: @@ -52,10 +58,24 @@ jobs: - name: Report testing coverage of project code run: coverage report -m + - name: General testing coverage report as XML format + if: ${{ inputs.generate_xml_report_finally }} == 'true' + run: coverage xml + - name: Rename the testing coverage report with test type + if: ${{ inputs.generate_xml_report_finally }} == 'false' run: mv .coverage .coverage-${{ inputs.test_type }} - name: Upload testing coverage report + if: ${{ inputs.generate_xml_report_finally }} == 'true' + uses: actions/upload-artifact@v3 + with: + name: final_project_testing_coverage_report + path: coverage.xml + if-no-files-found: error + + - name: Upload testing coverage report + if: ${{ inputs.generate_xml_report_finally }} == 'false' uses: actions/upload-artifact@v3 with: name: project_testing_coverage_report diff --git a/.github/workflows/upload_code_report_to_codacy.yaml b/.github/workflows/upload_code_report_to_codacy.yaml index 90b1185b..709003e7 100644 --- a/.github/workflows/upload_code_report_to_codacy.yaml +++ b/.github/workflows/upload_code_report_to_codacy.yaml @@ -38,7 +38,7 @@ jobs: - name: Download testing coverage report uses: actions/download-artifact@v3 with: - name: project_coverage_report + name: final_project_testing_coverage_report path: ${{ inputs.download_path }} - name: Generate testing report for Codacy diff --git a/.github/workflows/upload_test_report_to_codecov.yaml b/.github/workflows/upload_test_report_to_codecov.yaml index d3498de7..6912f550 100644 --- a/.github/workflows/upload_test_report_to_codecov.yaml +++ b/.github/workflows/upload_test_report_to_codecov.yaml @@ -51,7 +51,7 @@ jobs: - name: Download code coverage result file uses: actions/download-artifact@v3 with: - name: project_coverage_report + name: final_project_testing_coverage_report path: ${{ inputs.download_path }} - name: Upload coverage report to platform Codecov