mirror of https://github.com/hpcaitech/ColossalAI
[workflow] fixed the test coverage report (#2614)
* [workflow] fixed the test coverage report * polish codepull/2618/head
parent
b3973b995a
commit
aa7e9e4794
|
@ -46,14 +46,17 @@ jobs:
|
||||||
run: |
|
run: |
|
||||||
covNum=$(cat cov_number)
|
covNum=$(cat cov_number)
|
||||||
title="The code coverage for the changed files is ${covNum}%."
|
title="The code coverage for the changed files is ${covNum}%."
|
||||||
(echo $title; cat coverage.txt) > coverage_tmp.txt
|
touch coverage_report.txt
|
||||||
mv coverage_tmp.txt coverage.txt
|
echo $title >> coverage_report.txt
|
||||||
sed -i '2 i <details>' coverage.txt
|
echo " " >> coverage_report.txt
|
||||||
sed -i '3 i <summary>Click me to view the complete report</summary>' coverage.txt
|
echo "<details>" >> coverage_report.txt
|
||||||
sed -i '4 i \n' coverage.txt
|
echo "<summary>Click me to view the complete report</summary>" >> coverage_report.txt
|
||||||
sed -i '5 i \`\`\`text' coverage.txt
|
echo " " >> coverage_report.txt
|
||||||
echo "\`\`\`" >> coverage.txt
|
echo "\`\`\`" >> coverage_report.txt
|
||||||
echo "</details>" >> coverage.txt
|
cat coverage.txt >> coverage_report.txt
|
||||||
|
echo "\`\`\`" >> coverage_report.txt
|
||||||
|
echo "</details>" >> coverage_report.txt
|
||||||
|
mv coverage_report.txt coverage.txt
|
||||||
|
|
||||||
- name: 'Comment on PR'
|
- name: 'Comment on PR'
|
||||||
if: steps.unzip.outputs.hasReport == 'true'
|
if: steps.unzip.outputs.hasReport == 'true'
|
||||||
|
|
Loading…
Reference in New Issue