Skip to content

Commit 1c10281

Browse files
committed
✏️ Add one more command line parameter about test coverage report file path format.
1 parent 1dbd00c commit 1c10281

File tree

2 files changed

+4
-3
lines changed

2 files changed

+4
-3
lines changed

.github/workflows/rw_organize_test_cov_reports.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ jobs:
5555
- name: Combine all testing coverage data files with test type and runtime OS, and convert to XML format file finally
5656
run: |
5757
curl https://raw.githubusercontent.com/Chisanan232/GitHub-Action_Reusable_Workflows-Python/develop/scripts/ci/combine_coverage_reports.sh --output ./scripts/ci/combine_coverage_reports.sh
58-
bash ./scripts/ci/combine_coverage_reports.sh ${{ inputs.test_type }}
58+
bash ./scripts/ci/combine_coverage_reports.sh ${{ inputs.test_type }} .coverage.
5959
6060
- name: Upload testing coverage report (.coverage)
6161
uses: actions/upload-artifact@v4

scripts/ci/combine_coverage_reports.sh

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,14 +3,15 @@
33
set -ex
44

55
test_type=$1
6+
test_coverage_report_format=$2
67

78
coveragedatafile=".coverage.$test_type"
89

910
if [ "$test_type" == "all-test" ];
1011
then
11-
coverage combine --data-file="$coveragedatafile" .coverage.*
12+
coverage combine --data-file="$coveragedatafile" "$test_coverage_report_format"*
1213
else
13-
coverage combine --data-file="$coveragedatafile" .coverage."$test_type".*
14+
coverage combine --data-file="$coveragedatafile" "$test_coverage_report_format$test_type".*
1415
fi
1516

1617
coverage report -m --data-file="$coveragedatafile"

0 commit comments

Comments
 (0)