60
60
FULL_REPO="${{ github.repository }}"
61
61
REPO_NAME="${FULL_REPO##*/}"
62
62
BASE_BRANCH="${{ github.base_ref }}"
63
-
63
+ docker pull ${docker_image}
64
64
# Clean the repository directory before starting
65
65
docker run --rm --net=host -v $(pwd):/workspace -w /workspace \
66
66
-e "REPO_NAME=${REPO_NAME}" \
@@ -164,16 +164,19 @@ jobs:
164
164
165
165
git config --global --add safe.directory /workspace/FastDeploy
166
166
cd FastDeploy
167
- #python -m pip install --pre paddlepaddle-gpu -i https://www.paddlepaddle.org.cn/packages/nightly/cu126/
168
- python -m pip install paddlepaddle-gpu==3.0.0.dev20250818 -i https://www.paddlepaddle.org.cn/packages/nightly/cu126/
169
-
167
+ git diff origin/${BASE_REF}..HEAD --unified=0 > diff.txt
168
+ python -m pip install --pre paddlepaddle-gpu -i https://www.paddlepaddle.org.cn/packages/nightly/cu126/
170
169
pip config set global.extra-index-url https://mirrors.tuna.tsinghua.edu.cn/pypi/web/simple
171
170
172
171
python -m pip install coverage
173
172
python -m pip install diff-cover
174
173
python -m pip install pytest-cov
175
174
python -m pip install jsonschema aistudio_sdk==0.3.5
176
175
python -m pip install ${fd_wheel_url}
176
+ rm -rf fastdeploy
177
+ # coverage subprocess use
178
+ python -m pip install ${fd_wheel_url} --no-deps --target=/workspace/FastDeploy
179
+ export PYTHONPATH=/workspace/FastDeploy/
177
180
if [ -d "tests/plugins" ]; then
178
181
cd tests/plugins
179
182
python setup.py install
@@ -183,12 +186,11 @@ jobs:
183
186
fi
184
187
export COVERAGE_FILE=/workspace/FastDeploy/coveragedata/.coverage
185
188
export COVERAGE_RCFILE=/workspace/FastDeploy/scripts/.coveragerc
186
- export COVERAGE_PROCESS_START=/workspace/FastDeploy/scripts/.coveragerc
187
189
TEST_EXIT_CODE=0
188
190
bash scripts/coverage_run.sh || TEST_EXIT_CODE=8
189
- git diff origin/${BASE_REF}..HEAD --unified=0 > diff.txt
190
191
echo "TEST_EXIT_CODE=${TEST_EXIT_CODE}" >> exit_code.env
191
192
coverage combine coveragedata/ || echo "No data to combine"
193
+ coverage report
192
194
coverage xml -o python_coverage_all.xml
193
195
COVERAGE_EXIT_CODE=0
194
196
if [[ "$IS_PR" == "true" ]]; then
@@ -229,7 +231,7 @@ jobs:
229
231
echo "diff_cov_result_json_url=${DIFF_COV_JSON_URL}" >> $GITHUB_OUTPUT
230
232
echo "diff_cov_result_json_url=${DIFF_COV_JSON_URL}" >> $GITHUB_ENV
231
233
fi
232
- unittest_result="tests/ failed_tests.log"
234
+ unittest_result="failed_tests.log"
233
235
if [ -s ${unittest_result} ];then
234
236
python ${push_file} ${unittest_result} ${target_path}/UnitTestResult
235
237
target_path_stripped="${target_path#paddle-github-action/}"
0 commit comments