name: pre-commit on: workflow_call: permissions: contents: read jobs: pre-commit: runs-on: linux-amd64-cpu-8 container: image: swr.cn-southwest-2.myhuaweicloud.com/base_image/ascend-ci/cann:8.2.rc1-910b-ubuntu22.04-py3.11 steps: - name: Config mirrors run: | sed -Ei 's@(ports|archive).ubuntu.com@cache-service.nginx-pypi-cache.svc.cluster.local:8081@g' /etc/apt/sources.list pip config set global.index-url http://cache-service.nginx-pypi-cache.svc.cluster.local/pypi/simple pip config set global.trusted-host cache-service.nginx-pypi-cache.svc.cluster.local apt-get update -y apt install git -y - name: Checkout vllm-project/vllm-ascend repo uses: actions/checkout@v4 - run: echo "::add-matcher::.github/workflows/matchers/actionlint.json" - run: echo "::add-matcher::.github/workflows/matchers/mypy.json" - name: Checkout vllm-project/vllm repo uses: actions/checkout@v4 with: repository: vllm-project/vllm path: ./vllm-empty - name: Install vllm working-directory: vllm-empty run: | pip install -r requirements/build.txt --extra-index-url https://download.pytorch.org/whl/cpu VLLM_TARGET_DEVICE=empty pip install . - name: Install vllm-ascend dev run: | pip install -r requirements-dev.txt --extra-index-url https://download.pytorch.org/whl/cpu git config --global --add safe.directory '*' - name: Run pre-commit check env: SHELLCHECK_OPTS: "--exclude=SC2046,SC2006,SC2086" GOPROXY: "https://goproxy.cn,direct" run: pre-commit run --all-files --hook-stage manual