Skip to content

Commit 7eb9f23

Browse files
wangxiyuanwangxiaoxin (A)
authored andcommitted
[CI] Run e2e after pre check pass (vllm-project#1132)
Make sure the lint test passed before start the e2e test to save compute resource. Updated the patch doc to make sure the CI works as expect. Signed-off-by: wangxiyuan <wangxiyuan1007@gmail.com> Signed-off-by: wangxiaoxin (A) <wangxiaoxin7@huawei.com>
1 parent d1095bc commit 7eb9f23

File tree

6 files changed

+128
-260
lines changed

6 files changed

+128
-260
lines changed

.github/workflows/codespell.yml

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

.github/workflows/mypy.yaml

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

.github/workflows/ruff.yml

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

.github/workflows/vllm_ascend_test.yaml

Lines changed: 63 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
# This file is a part of the vllm-ascend project.
1616
#
1717

18-
name: 'e2e test'
18+
name: 'test'
1919

2020
on:
2121
pull_request:
@@ -29,6 +29,9 @@ on:
2929
- '!docs/**'
3030
- 'pytest.ini'
3131
- '!benchmarks/**'
32+
- 'tools/mypy.sh'
33+
- 'mypy.ini'
34+
3235
# Bash shells do not use ~/.profile or ~/.bashrc so these shells need to be explicitly
3336
# declared as "shell: bash -el {0}" on steps that need to be properly activated.
3437
# It's used to activate ascend-toolkit environment variables.
@@ -37,7 +40,65 @@ defaults:
3740
shell: bash -el {0}
3841

3942
jobs:
40-
test:
43+
lint:
44+
runs-on: ubuntu-latest
45+
strategy:
46+
matrix:
47+
python-version: ["3.10"]
48+
steps:
49+
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
50+
- name: Set up Python ${{ matrix.python-version }}
51+
uses: actions/setup-python@a26af69be951a213d495a4c3e4e4022e16d87065 # v5.6.0
52+
with:
53+
python-version: ${{ matrix.python-version }}
54+
- name: Install dependencies
55+
run: |
56+
python -m pip install --upgrade pip
57+
pip install -r requirements-lint.txt
58+
- name: Run codespell check
59+
run: |
60+
CODESPELL_EXCLUDES=('--skip' 'tests/prompts/**,./benchmarks/sonnet.txt,*tests/lora/data/**,build/**,./vllm_ascend.egg-info/**')
61+
CODESPELL_IGNORE_WORDS=('-L' 'CANN,cann,NNAL,nnal,ASCEND,ascend,EnQue,CopyIn')
62+
63+
codespell --toml pyproject.toml "${CODESPELL_EXCLUDES[@]}" "${CODESPELL_IGNORE_WORDS[@]}"
64+
- name: Analysing the code with ruff
65+
run: |
66+
echo "::add-matcher::.github/workflows/matchers/ruff.json"
67+
ruff check --output-format github .
68+
- name: Run isort
69+
run: |
70+
isort . --check-only
71+
- name: Running yapf
72+
run: |
73+
python -m pip install --upgrade pip
74+
pip install toml
75+
pip install yapf==0.32.0
76+
yapf --diff --recursive .
77+
78+
- name: Install dependencies
79+
run: |
80+
pip install -r requirements-dev.txt --extra-index-url https://download.pytorch.org/whl/cpu
81+
82+
- name: Checkout vllm-project/vllm repo
83+
uses: actions/checkout@v4
84+
with:
85+
repository: vllm-project/vllm
86+
path: vllm-empty
87+
88+
- name: Install vllm-project/vllm from source
89+
working-directory: vllm-empty
90+
run: |
91+
pip install -r requirements/build.txt --extra-index-url https://download.pytorch.org/whl/cpu
92+
VLLM_TARGET_DEVICE=empty pip install .
93+
94+
- name: Mypy Check
95+
run: |
96+
echo "::add-matcher::.github/workflows/matchers/mypy.json"
97+
tools/mypy.sh 1 ${{ matrix.python-version }}
98+
99+
e2e:
100+
needs: [lint]
101+
if: ${{ needs.lint.result == 'success' }}
41102
strategy:
42103
max-parallel: 2
43104
matrix:

.github/workflows/yapf.yml

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

0 commit comments

Comments
 (0)