Skip to content

Commit caee94f

Browse files
authored
[CI] update codecov (#2588)
1 parent 3d40f94 commit caee94f

File tree

4 files changed

+27
-9
lines changed

4 files changed

+27
-9
lines changed

.github/workflows/ce-unittest-gpu.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -66,6 +66,8 @@ jobs:
6666
-e repo_branch \
6767
-e FLAGS_dynamic_static_unified_comm \
6868
-e python_version \
69+
-e HF_PROXY_PATH=$work_dir/../../../proxy_huggingface \
70+
-e AISTUDIO_PROXY_PATH=$work_dir/../../../proxy_aistudio \
6971
-w /workspace --runtime=nvidia --privileged $IMAGE_NAME
7072
7173
- name: Download Code

.github/workflows/unittest-cpu.yml

Lines changed: 21 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -131,12 +131,28 @@ jobs:
131131
if: always()
132132
runs-on: ubuntu-latest
133133
steps:
134-
- name: Wget Cov-report
134+
- name: Checkout Code
135+
uses: actions/checkout@v4
136+
with:
137+
fetch-depth: 0
138+
139+
- name: Download coverage.xml
135140
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
141+
wget -q --no-proxy \
142+
https://paddle-github-action.bj.bcebos.com/PR/PaddleFormers/unittest-cpu/${PR_ID}/${COMMIT_ID}/logs/coverage.xml \
143+
--no-check-certificate -O coverage.xml
137144
138-
- name: Upload Cov-report
145+
- name: Debug coverage paths
146+
run: |
147+
echo "=== coverage.xml (first 30 lines) ==="
148+
head -n 30 coverage.xml
149+
echo "=== Check if source files exist ==="
150+
grep -o 'filename="[^"]*"' coverage.xml | head -n 10
151+
find paddleformers -type f | head -n 10
152+
153+
- name: Upload coverage to Codecov
139154
uses: codecov/codecov-action@v4
155+
with:
156+
files: coverage.xml
140157
env:
141-
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}
142-
if-no-files-found: ignore
158+
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}

Makefile

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -39,8 +39,8 @@ unit-test:
3939
PYTHONPATH=$(shell pwd) pytest -v \
4040
--retries 1 --retry-delay 1 \
4141
--durations 20 \
42-
--cov paddleformers \
43-
--cov-report xml:coverage.xml
42+
--cov=./paddleformers \
43+
--cov-report=xml:coverage.xml
4444

4545
# # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # #
4646

scripts/regression/build.sh

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -65,12 +65,12 @@ paddleformers_build (){
6565
python -c "import paddleformers; print('paddleformers commit:',paddleformers.version.commit)" >> ${log_path}/commit_info.txt
6666

6767
cp $formers_dir/dist/p****.whl ${upload_path}/
68-
cp $formers_dir/dist/p****.whl ${upload_path}/paddleformers-latest-py3-none-any.whl
68+
cp $formers_dir/dist/p****.whl ${upload_path}/paddleformers-0.0.0-py3-none-any.whl
6969
}
7070

7171
install_paddleformers(){
7272
echo "install_formers_develop"
73-
python -m pip install --user https://paddleformers.bj.bcebos.com/wheels/paddleformers-latest-py3-none-any.whl --no-cache-dir
73+
python -m pip install --user https://paddleformers.bj.bcebos.com/wheels/paddleformers-0.0.0-py3-none-any.whl --no-cache-dir
7474
python -c "import paddleformers; print('paddleformers commit:',paddleformers.version.commit)" >> ${log_path}/commit_info.txt
7575
}
7676

0 commit comments

Comments
 (0)