98
98
echo "finished"
99
99
'
100
100
101
+ - name : Upload Cov-report
102
+ if : always()
103
+ env :
104
+ home_path : ${{ github.workspace }}/../../..
105
+ bos_file : ${{ github.workspace }}/../../../bos/BosClient.py
106
+ allure_file : ${{ github.workspace }}/../../../allure-2.19.0/bin/allure
107
+ run : |
108
+ docker exec -t $container_name /bin/bash -c '
109
+ if [ ! -f "${{ env.bos_file }}" ]; then
110
+ wget -q --no-proxy -O ${{ env.home_path }}/bos_new.tar.gz https://xly-devops.bj.bcebos.com/home/bos_new.tar.gz --no-check-certificate
111
+ mkdir ${{ env.home_path }}/bos
112
+ tar xf ${{ env.home_path }}/bos_new.tar.gz -C ${{ env.home_path }}/bos
113
+ fi
114
+ if [ ! -f "${{ env.allure_file }}" ]; then
115
+ wget -q --no-proxy -O ${{ env.home_path }}/allure-2.19.0.zip https://xly-devops.bj.bcebos.com/tools/allure-2.19.0.zip --no-check-certificate
116
+ unzip -q ${{ env.home_path }}/allure-2.19.0.zip
117
+ fi
118
+ cd /workspace/PaddleFormers
119
+ python ${{ env.bos_file }} coverage.xml paddle-github-action/PR/PaddleFormers/unittest-cpu/${PR_ID}/${COMMIT_ID}/logs
120
+ echo "cov-report: https://paddle-github-action.bj.bcebos.com/PR/PaddleFormers/unittest-cpu/${PR_ID}/${COMMIT_ID}/logs/coverage.xml"
121
+ '
101
122
102
123
- name : Terminate And Delete the Container
103
124
if : always()
104
125
run : |
105
126
docker rm -f $container_name 2>/dev/null || true
127
+
128
+ upload-coverage :
129
+ name : upload-coverage
130
+ needs : [unittest-cpu-ci]
131
+ if : always()
132
+ runs-on : ubuntu-latest
133
+ steps :
134
+ - name : Wget Cov-report
135
+ run : |
136
+ wget -q --no-proxy https://paddle-github-action.bj.bcebos.com/PR/PaddleFormers/unittest-cpu/${PR_ID}/${COMMIT_ID}/logs/coverage.xml --no-check-certificate
137
+
138
+ - name : Upload Cov-report
139
+ uses : codecov/codecov-action@v4
140
+ env :
141
+ CODECOV_TOKEN : ${{ secrets.CODECOV_TOKEN }}
142
+ if-no-files-found : ignore
0 commit comments