Skip to content

Commit 011fd73

Browse files
authored
[CI] Make CI tracker more clear (#1720)
1. enable lint check for all change 2. only run ut and e2e if it's the code change. 3. only run ut and disable e2e if the change is ut only. 4. disable wheel build for push case 5. run unit test when pr is merged 6. remove useless pytest.ini - vLLM version: v0.9.2 - vLLM main: vllm-project/vllm@fdfd409 Signed-off-by: wangxiyuan <wangxiyuan1007@gmail.com>
1 parent 3d1e6a5 commit 011fd73

File tree

4 files changed

+30
-125
lines changed

4 files changed

+30
-125
lines changed

.github/workflows/release_code.yml

Lines changed: 0 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -32,20 +32,8 @@ on:
3232
- 'CMakeLists.txt'
3333
- 'csrc/**'
3434
push:
35-
branches:
36-
- 'main'
37-
- '*-dev'
3835
tags:
3936
- 'v*'
40-
paths:
41-
- '.github/workflows/release_code.yml'
42-
- 'vllm_ascend/**'
43-
- 'setup.py'
44-
- 'pyproject.toml'
45-
- 'requirements.txt'
46-
- 'cmake/**'
47-
- 'CMakeLists.txt'
48-
- 'csrc/**'
4937

5038
jobs:
5139
build:

.github/workflows/release_whl.yml

Lines changed: 0 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -36,21 +36,8 @@ on:
3636
- 'CMakeLists.txt'
3737
- 'csrc/**'
3838
push:
39-
branches:
40-
- 'main'
41-
- '*-dev'
4239
tags:
4340
- 'v*'
44-
paths:
45-
- '.github/workflows/release_whl.yml'
46-
- '.github/Dockerfile.buildwheel'
47-
- 'vllm_ascend/**'
48-
- 'setup.py'
49-
- 'pyproject.toml'
50-
- 'requirements.txt'
51-
- 'cmake/**'
52-
- 'CMakeLists.txt'
53-
- 'csrc/**'
5441

5542
jobs:
5643
build:

.github/workflows/vllm_ascend_test.yaml

Lines changed: 30 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -19,38 +19,12 @@ name: 'test'
1919

2020
on:
2121
push:
22-
# Enable merged test per commit
2322
branches:
2423
- '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'
3724
pull_request:
3825
branches:
3926
- 'main'
4027
- '*-dev'
41-
paths:
42-
- '*.txt'
43-
- '**/*.py'
44-
- '.github/workflows/vllm_ascend_test.yaml'
45-
- '!docs/**'
46-
- '!examples/**'
47-
- 'pytest.ini'
48-
- '!benchmarks/**'
49-
- 'tools/mypy.sh'
50-
- 'mypy.ini'
51-
- '.github/workflows/*.ya?ml'
52-
- '.github/workflows/actionlint.*'
53-
- '.github/workflows/matchers/actionlint.json'
5428

5529
# Bash shells do not use ~/.profile or ~/.bashrc so these shells need to be explicitly
5630
# declared as "shell: bash -el {0}" on steps that need to be properly activated.
@@ -71,11 +45,35 @@ jobs:
7145
if: ${{ github.event_name == 'pull_request' }}
7246
uses: ./.github/workflows/pre-commit.yml
7347

48+
changes:
49+
# Only trigger changes on pull request
50+
if: ${{ github.event_name == 'pull_request' }}
51+
runs-on: ubuntu-latest
52+
permissions:
53+
pull-requests: read
54+
outputs:
55+
e2e_tracker: ${{ steps.filter.outputs.e2e_tracker }}
56+
ut_tracker: ${{ steps.filter.outputs.ut_tracker }}
57+
steps:
58+
- uses: dorny/paths-filter@v3
59+
id: filter
60+
with:
61+
filters: |
62+
e2e_tracker:
63+
- 'vllm_ascend/**'
64+
- 'csrc/**'
65+
- 'cmake/**'
66+
- 'tests/e2e/**'
67+
- 'tests/conftest.py'
68+
- 'tests/model_utils.py'
69+
- 'tests/utils.py'
70+
ut_tracker:
71+
- 'tests/ut/**'
7472
ut:
75-
needs: [lint]
73+
needs: [lint, changes]
7674
name: unit test
77-
# only trigger e2e test on [pull request after lint passed] and [merged commit]
78-
if: ${{ needs.lint.result == 'success' || github.event_name == 'push' }}
75+
# only trigger unit test after lint passed and the change is e2e and ut related. Or the PR is merged.
76+
if: ${{ github.event_name == 'push' || (needs.lint.result == 'success' && (needs.changes.outputs.e2e_tracker == 'true' || needs.changes.outputs.ut_tracker == 'true')) }}
7977
runs-on: ubuntu-latest
8078
container:
8179
image: quay.io/ascend/cann:8.1.rc1-910b-ubuntu22.04-py3.10
@@ -134,9 +132,9 @@ jobs:
134132
verbose: true
135133

136134
e2e:
137-
needs: [lint]
138-
# only trigger e2e test on pull request after lint passed
139-
if: ${{ needs.lint.result == 'success' && github.event_name == 'pull_request' }}
135+
needs: [lint, changes]
136+
# only trigger e2e test after lint passed and the change is e2e related.
137+
if: ${{ needs.lint.result == 'success' && needs.changes.outputs.e2e_tracker == 'true' }}
140138
strategy:
141139
max-parallel: 2
142140
matrix:

pytest.ini

Lines changed: 0 additions & 68 deletions
This file was deleted.

0 commit comments

Comments
 (0)