Skip to content

Commit b8f3c73

Browse files
authored
fix coverage report (#3198)
* fix coverage report * fix
1 parent fb7a068 commit b8f3c73

File tree

1 file changed

+8
-6
lines changed

1 file changed

+8
-6
lines changed

.github/workflows/_unit_test_coverage.yml

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
name: Run FastDeploy Unit Tests and Coverage
1+
name: Coverage Check
22
description: "Run FastDeploy Unit Tests and Coverage"
33

44
on:
@@ -134,7 +134,7 @@ jobs:
134134
commit_id=${{ github.event.pull_request.head.sha }}
135135
pr_num=${{ github.event.pull_request.number }}
136136
target_path=paddle-github-action/PR/FastDeploy/${pr_num}/${commit_id}/SM${compile_arch//,/_}
137-
wget -q --no-proxy --no-check-certificate https://paddle-qa.bj.bcebos.com/CodeSync/develop/PaddlePaddle/PaddleTest/tools/bos_tools.py
137+
wget -q --no-proxy --no-check-certificate https://paddle-qa.bj.bcebos.com/CodeSync/develop/PaddlePaddle/PaddleTest/tools/bos_tools.py -O bos_tools.py
138138
push_file=$(realpath bos_tools.py)
139139
python -m pip install bce-python-sdk==0.9.29
140140
diff_cov_file="diff_coverage.xml"
@@ -165,13 +165,14 @@ jobs:
165165
shell: bash
166166
run: |
167167
if [ "$TEST_EXIT_CODE" -eq 8 ]; then
168+
filename=$(basename "$unittest_failed_url")
168169
if [ -z "${unittest_failed_url}" ]; then
169170
echo "No diff unit failed file URL provided."
170171
else
171-
wget ${unittest_failed_url} || echo "Download unittest file failed, but continuing..."
172+
rm -rf "${filename}"
173+
wget -O ${filename} ${unittest_failed_url} || echo "Download unittest file failed, but continuing..."
172174
fi
173175
echo "Unit tests failed (exit code 8)"
174-
filename=$(basename "$unittest_failed_url")
175176
if [ -f "${filename}" ];then
176177
echo "Failed test cases:"
177178
cat "${filename}"
@@ -181,12 +182,13 @@ jobs:
181182
182183
if [ "$COVERAGE_EXIT_CODE" -eq 9 ]; then
183184
echo "Coverage generation failed (exit code 9)"
185+
filename=$(basename "$diff_cov_result_json_url")
184186
if [ -z "${diff_cov_result_json_url}" ]; then
185187
echo "No diff cov result file URL provided."
186188
else
187-
wget ${diff_cov_result_json_url} || echo "Download cov json file failed, but continuing..."
189+
rm -rf "${filename}"
190+
wget -O ${filename} ${diff_cov_result_json_url} || echo "Download cov json file failed, but continuing..."
188191
fi
189-
filename=$(basename "$diff_cov_result_json_url")
190192
if [ -f "${filename}" ];then
191193
echo "Failed test cases:"
192194
if command -v jq >/dev/null 2>&1; then

0 commit comments

Comments
 (0)