Add e2e test frame work and doctest #8
Workflow file for this run
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# | |
# 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: 'Doctest' | |
on: | |
pull_request: | |
branches: | |
- 'main' | |
- '*-dev' | |
paths: | |
# If we are changing the doctest we should do a PR test | |
- '.github/workflows/vllm_ascend_doctest.yaml' | |
- 'tests/doctest/**' | |
schedule: | |
# Runs at 01:00 UTC (8:00 AM Beijing) every day | |
- cron: '0 0 * * *' | |
# 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, main-openeuler, v0.7.3-dev-openeuler] | |
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: | | |
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: | | |
# Prnint hash info | |
cd /workspace/vllm-ascend | |
git --no-pager log -1 | |
cd /workspace/vllm | |
git --no-pager log -1 | |
# PWD: /__w/vllm-ascend/vllm-ascend | |
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 | |
# Simulate container to enter directory | |
# TODO(yikun): should change `/` to `/workspace` after #725 relsoved: | |
# [Bug]: Fail to start vllm under /workspace | |
# https://github.com/vllm-project/vllm-ascend/issues/725 | |
cd / | |
./workspace/vllm-ascend/tests/doctest/run_tests.sh |