Skip to content

Commit 95414ba

Browse files
authored
[CI] Run e2e after pre check pass (#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>
1 parent b75cb78 commit 95414ba

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
schedule:
@@ -31,6 +31,9 @@ on:
3131
- '!docs/**'
3232
- 'pytest.ini'
3333
- '!benchmarks/**'
34+
- 'tools/mypy.sh'
35+
- 'mypy.ini'
36+
3437
# Bash shells do not use ~/.profile or ~/.bashrc so these shells need to be explicitly
3538
# declared as "shell: bash -el {0}" on steps that need to be properly activated.
3639
# It's used to activate ascend-toolkit environment variables.
@@ -39,7 +42,65 @@ defaults:
3942
shell: bash -el {0}
4043

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

.github/workflows/yapf.yml

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

0 commit comments

Comments
 (0)