15
15
# This file is a part of the vllm-ascend project.
16
16
#
17
17
18
- name : ' e2e test'
18
+ name : ' test'
19
19
20
20
on :
21
21
pull_request :
29
29
- ' !docs/**'
30
30
- ' pytest.ini'
31
31
- ' !benchmarks/**'
32
+ - ' tools/mypy.sh'
33
+ - ' mypy.ini'
34
+
32
35
# Bash shells do not use ~/.profile or ~/.bashrc so these shells need to be explicitly
33
36
# declared as "shell: bash -el {0}" on steps that need to be properly activated.
34
37
# It's used to activate ascend-toolkit environment variables.
@@ -37,7 +40,65 @@ defaults:
37
40
shell : bash -el {0}
38
41
39
42
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' }}
41
102
strategy :
42
103
max-parallel : 2
43
104
matrix :
0 commit comments