Skip to content

Add e2e test frame work and doctest #6

Add e2e test frame work and doctest

Add e2e test frame work and doctest #6

#
# Copyright (c) 2025 Huawei Technologies Co., Ltd. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
# This file is a part of the vllm-ascend project.
#
name: 'e2e test'
on:
pull_request:
branches:
- 'main'
- '*-dev'
paths:
- '.github/workflows/vllm_ascend_doctest.yaml'
# Bash shells do not use ~/.profile or ~/.bashrc so these shells need to be explicitly
# declared as "shell: bash -el {0}" on steps that need to be properly activated.
# It's used to activate ascend-toolkit environment variables.
defaults:
run:
shell: bash -el {0}
jobs:
test:
strategy:
# Each version should be tested
fail-fast: false
matrix:
vllm_verison: [main, v0.7.3-dev, v0.8.4rc2, v0.8.4rc1]
name: vLLM Ascend test
runs-on: linux-arm64-npu-1
container:
image: m.daocloud.io/quay.io/ascend/vllm-ascend:${{ matrix.vllm_verison }}
steps:
- name: Check npu and CANN info
run: |
pwd
npu-smi info
cat /usr/local/Ascend/ascend-toolkit/latest/"$(uname -i)"-linux/ascend_toolkit_install.info
- name: Config mirrors
run: |
sed -i 's|ports.ubuntu.com|mirrors.tuna.tsinghua.edu.cn|g' /etc/apt/sources.list
pip config set global.index-url https://mirrors.tuna.tsinghua.edu.cn/pypi/web/simple
apt-get update -y
apt install git curl -y
git config --global url."https://gh-proxy.test.osinfra.cn/https://github.com/".insteadOf https://github.com/
- name: Checkout vllm-project/vllm-ascend repo
uses: actions/checkout@v4
- name: Run vllm-project/vllm test for V0 Engine
run: |
pwd
ls -la
if [ ! -d /workspace/vllm-ascend/tests/doctest ]; then
echo "Warning: the doctest path doesn't exists, copy now"
cp -r tests/doctest /workspace/vllm-ascend/tests/
fi
cd /workspace
./vllm-ascend/tests/doctest/run_tests.sh