|
5 | 5 | # |
6 | 6 | # Workflow input parameters: |
7 | 7 | # * test_type: The testing type. In generally, it only has 2 options: 'unit-test' and 'integration-test'. |
8 | | -# * generate_xml_report_finally: Something, it only has 1 test type currently. So it could let this option |
9 | | -# to be 'true' than it would generate XML report finally to let uploading process to use it directly. |
10 | 8 | # |
11 | 9 | # Workflow running output: |
12 | 10 | # No, but it would save the testing coverage reports (coverage.xml) to provide after-process to organize and record. |
|
22 | 20 | description: "The testing type. In generally, it only has 2 options: 'unit-test' and 'integration-test'." |
23 | 21 | required: true |
24 | 22 | type: string |
25 | | -# generate_xml_report_finally: |
26 | | -# 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." |
27 | | -# type: boolean |
28 | | -# required: false |
29 | | -# default: false |
30 | 23 |
|
31 | 24 |
|
32 | 25 | jobs: |
|
53 | 46 | pip3 install -U pip |
54 | 47 | pip3 install coverage |
55 | 48 |
|
56 | | - - name: Combine all testing code coverage result files with ${{ inputs.test_type }} |
| 49 | + - name: Combine all testing code coverage result files with one specific test type |
57 | 50 | if: ${{ inputs.test_type == 'unit-test' || inputs.test_type == 'integration-test' }} |
58 | 51 | run: coverage combine --data-file=.coverage.${{ inputs.test_type }} .coverage.${{ inputs.test_type }}.* |
59 | 52 |
|
|
73 | 66 | name: final_project_testing_coverage_report |
74 | 67 | path: coverage_${{ inputs.test_type }}.xml |
75 | 68 | if-no-files-found: error |
76 | | - |
77 | | -# generate_final_test_report: |
78 | | -# if: ${{ inputs.generate_xml_report_finally == true }} |
79 | | -## if: inputs.generate_xml_report_finally == 'true' |
80 | | -# needs: organize_test_reports |
81 | | -# runs-on: ubuntu-latest |
82 | | -# steps: |
83 | | -# - name: Download code coverage result file |
84 | | -# uses: actions/download-artifact@v3 |
85 | | -# with: |
86 | | -# name: project_testing_coverage_report_${{ inputs.test_type }} |
87 | | -# path: ./ |
88 | | -# |
89 | | -# - name: General testing coverage report as XML format |
90 | | -# run: coverage xml --data-file=.coverage_test -o coverage_test.xml |
91 | | -# |
92 | | -# - name: Upload testing coverage report |
93 | | -# uses: actions/upload-artifact@v3 |
94 | | -# with: |
95 | | -# name: final_project_testing_coverage_report |
96 | | -# path: coverage.xml |
97 | | -# if-no-files-found: error |
98 | | - |
99 | | -# generate_test_type_report: |
100 | | -# if: ${{ inputs.generate_xml_report_finally == false }} |
101 | | -## if: inputs.generate_xml_report_finally == 'false' |
102 | | -# needs: organize_test_reports |
103 | | -# runs-on: ubuntu-latest |
104 | | -# steps: |
105 | | -# - name: Download code coverage result file |
106 | | -# uses: actions/download-artifact@v3 |
107 | | -# with: |
108 | | -# name: project_testing_coverage_report_${{ inputs.test_type }} |
109 | | -# path: ./ |
110 | | -# |
111 | | -# - name: Rename the testing coverage report with test type |
112 | | -# run: mv .coverage .coverage-${{ inputs.test_type }} |
113 | | -# |
114 | | -# - name: Upload testing coverage report |
115 | | -# uses: actions/upload-artifact@v3 |
116 | | -# with: |
117 | | -# name: new_project_testing_coverage_report_${{ inputs.test_type }} |
118 | | -# path: .coverage-${{ inputs.test_type }} |
119 | | -# if-no-files-found: error |
0 commit comments