Skip to content

Commit 2009fdb

Browse files
authored
[Test] Enable code cov for V1 and enable push trigger (vllm-project#1164)
### What this PR does / why we need it? - Enable code cov for V1 - Enable push triggered job ### Does this PR introduce _any_ user-facing change? No ### How was this patch tested? CI passed Signed-off-by: Yikun Jiang <yikunkero@gmail.com>
1 parent 2f1266d commit 2009fdb

File tree

3 files changed

+59
-4
lines changed

3 files changed

+59
-4
lines changed

.github/workflows/vllm_ascend_test.yaml

Lines changed: 28 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -18,8 +18,22 @@
1818
name: 'test'
1919

2020
on:
21-
schedule:
22-
- cron: '0 23 * * *'
21+
push:
22+
# Enable merged test per commit
23+
branches:
24+
- 'main'
25+
paths:
26+
- '*.txt'
27+
- '**/*.py'
28+
- '.github/workflows/vllm_ascend_test.yaml'
29+
- '!docs/**'
30+
- 'pytest.ini'
31+
- '!benchmarks/**'
32+
- 'tools/mypy.sh'
33+
- 'mypy.ini'
34+
- '.github/workflows/*.ya?ml'
35+
- '.github/workflows/actionlint.*'
36+
- '.github/workflows/matchers/actionlint.json'
2337
pull_request:
2438
branches:
2539
- 'main'
@@ -131,7 +145,7 @@ jobs:
131145
- name: Install packages
132146
run: |
133147
apt-get update -y
134-
apt-get install -y python3-pip git vim wget net-tools gcc g++ cmake libnuma-dev
148+
apt-get install -y python3-pip git vim wget net-tools gcc g++ cmake libnuma-dev curl gnupg2
135149
136150
- name: Checkout vllm-project/vllm repo
137151
uses: actions/checkout@v4
@@ -163,7 +177,17 @@ jobs:
163177
TORCH_DEVICE_BACKEND_AUTOLOAD: 0
164178
run: |
165179
export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/usr/local/Ascend/ascend-toolkit/latest/x86_64-linux/devlib
166-
pytest -sv tests/ut
180+
pytest -sv --cov --cov-report=xml:unittests-coverage.xml tests/ut
181+
182+
- name: Upload coverage to Codecov
183+
if: ${{ matrix.vllm_version == 'main' }}
184+
uses: codecov/codecov-action@v5
185+
env:
186+
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}
187+
with:
188+
flags: unittests
189+
name: vllm-ascend
190+
verbose: true
167191

168192
e2e:
169193
needs: [lint]

codecov.yml

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
#
2+
# Copyright (c) 2025 Huawei Technologies Co., Ltd. All Rights Reserved.
3+
#
4+
# Licensed under the Apache License, Version 2.0 (the "License");
5+
# you may not use this file except in compliance with the License.
6+
# You may obtain a copy of the License at
7+
#
8+
# http://www.apache.org/licenses/LICENSE-2.0
9+
#
10+
# Unless required by applicable law or agreed to in writing, software
11+
# distributed under the License is distributed on an "AS IS" BASIS,
12+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13+
# See the License for the specific language governing permissions and
14+
# limitations under the License.
15+
# This file is a part of the vllm-ascend project.
16+
#
17+
18+
coverage:
19+
status:
20+
# non-voting, new code must be fully tested
21+
patch:
22+
default:
23+
target: 100%
24+
# non-voting
25+
informational: true
26+
# non-voting
27+
project:
28+
default:
29+
# non-voting
30+
informational: true

requirements-dev.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,3 +11,4 @@ types-jsonschema
1111
xgrammar
1212
zmq
1313
types-psutil
14+
pytest-cov

0 commit comments

Comments
 (0)