1
- name : Run FastDeploy Unit Tests and Coverage
1
+ name : Coverage Check
2
2
description : " Run FastDeploy Unit Tests and Coverage"
3
3
4
4
on :
@@ -134,7 +134,7 @@ jobs:
134
134
commit_id=${{ github.event.pull_request.head.sha }}
135
135
pr_num=${{ github.event.pull_request.number }}
136
136
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
138
138
push_file=$(realpath bos_tools.py)
139
139
python -m pip install bce-python-sdk==0.9.29
140
140
diff_cov_file="diff_coverage.xml"
@@ -165,13 +165,14 @@ jobs:
165
165
shell : bash
166
166
run : |
167
167
if [ "$TEST_EXIT_CODE" -eq 8 ]; then
168
+ filename=$(basename "$unittest_failed_url")
168
169
if [ -z "${unittest_failed_url}" ]; then
169
170
echo "No diff unit failed file URL provided."
170
171
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..."
172
174
fi
173
175
echo "Unit tests failed (exit code 8)"
174
- filename=$(basename "$unittest_failed_url")
175
176
if [ -f "${filename}" ];then
176
177
echo "Failed test cases:"
177
178
cat "${filename}"
@@ -181,12 +182,13 @@ jobs:
181
182
182
183
if [ "$COVERAGE_EXIT_CODE" -eq 9 ]; then
183
184
echo "Coverage generation failed (exit code 9)"
185
+ filename=$(basename "$diff_cov_result_json_url")
184
186
if [ -z "${diff_cov_result_json_url}" ]; then
185
187
echo "No diff cov result file URL provided."
186
188
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..."
188
191
fi
189
- filename=$(basename "$diff_cov_result_json_url")
190
192
if [ -f "${filename}" ];then
191
193
echo "Failed test cases:"
192
194
if command -v jq >/dev/null 2>&1; then
0 commit comments