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