Skip to content

Commit 7a13a35

Browse files
authored
Merge pull request #7 from Chisanan232/develop
🎉🎊🍾 [Breaking Change] (config) Modify the process about organizing & uploading testing coverage reports processes.
2 parents a4b2dd8 + fa4c1fb commit 7a13a35

File tree

3 files changed

+22
-2
lines changed

3 files changed

+22
-2
lines changed

.github/workflows/organize_all_testing_coverage_reports_with_different_os_and_py_version.yaml

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,8 @@
55
#
66
# Workflow input parameters:
77
# * 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.
810
#
911
# Workflow running output:
1012
# No, but it would save the testing coverage reports (coverage.xml) to provide after-process to organize and record.
@@ -20,6 +22,10 @@ on:
2022
description: "The testing type. In generally, it only has 2 options: 'unit-test' and 'integration-test'."
2123
required: true
2224
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+
required: true
28+
type: boolean
2329

2430

2531
jobs:
@@ -52,10 +58,24 @@ jobs:
5258
- name: Report testing coverage of project code
5359
run: coverage report -m
5460

61+
- name: General testing coverage report as XML format
62+
if: ${{ inputs.generate_xml_report_finally }} == 'true'
63+
run: coverage xml
64+
5565
- name: Rename the testing coverage report with test type
66+
if: ${{ inputs.generate_xml_report_finally }} == 'false'
5667
run: mv .coverage .coverage-${{ inputs.test_type }}
5768

5869
- name: Upload testing coverage report
70+
if: ${{ inputs.generate_xml_report_finally }} == 'true'
71+
uses: actions/upload-artifact@v3
72+
with:
73+
name: final_project_testing_coverage_report
74+
path: coverage.xml
75+
if-no-files-found: error
76+
77+
- name: Upload testing coverage report
78+
if: ${{ inputs.generate_xml_report_finally }} == 'false'
5979
uses: actions/upload-artifact@v3
6080
with:
6181
name: project_testing_coverage_report

.github/workflows/upload_code_report_to_codacy.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ jobs:
3838
- name: Download testing coverage report
3939
uses: actions/download-artifact@v3
4040
with:
41-
name: project_coverage_report
41+
name: final_project_testing_coverage_report
4242
path: ${{ inputs.download_path }}
4343

4444
- name: Generate testing report for Codacy

.github/workflows/upload_test_report_to_codecov.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ jobs:
5151
- name: Download code coverage result file
5252
uses: actions/download-artifact@v3
5353
with:
54-
name: project_coverage_report
54+
name: final_project_testing_coverage_report
5555
path: ${{ inputs.download_path }}
5656

5757
- name: Upload coverage report to platform Codecov

0 commit comments

Comments
 (0)