-
Notifications
You must be signed in to change notification settings - Fork 10
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
split main and prs gha to allow dependabot-only cov step
- Loading branch information
1 parent
20db20b
commit cd73ed9
Showing
2 changed files
with
85 additions
and
2 deletions.
There are no files selected for viewing
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,85 @@ | ||
name: Tests | ||
|
||
on: | ||
# this target allows you to run tests in base context and access secrets | ||
# so we can have dependabot PRs auto-merge on test pass | ||
pull_request_target: | ||
branches: | ||
- main | ||
merge_group: | ||
workflow_dispatch: | ||
|
||
env: | ||
FORCE_COLOR: "1" | ||
# facilitate testing by building vLLM for CPU when needed | ||
VLLM_CPU_DISABLE_AVX512: "true" | ||
VLLM_TARGET_DEVICE: "cpu" | ||
# prefer torch cpu version | ||
PIP_EXTRA_INDEX_URL: "https://download.pytorch.org/whl/cpu" | ||
|
||
concurrency: | ||
group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }} | ||
cancel-in-progress: true | ||
|
||
jobs: | ||
tests: | ||
timeout-minutes: 20 | ||
runs-on: ${{ matrix.os }} | ||
strategy: | ||
fail-fast: false | ||
matrix: | ||
os: [ubuntu-latest] | ||
pyv: ["3.11"] | ||
vllm_version: | ||
# - "" # skip the pypi version as it will not work on CPU | ||
- "git+https://github.com/vllm-project/vllm@v0.6.1" | ||
- "git+https://github.com/vllm-project/vllm@main" | ||
- "git+https://github.com/opendatahub-io/vllm@main" | ||
|
||
steps: | ||
- name: Check out the PR | ||
uses: actions/checkout@v4 | ||
with: | ||
ref: ${{ github.event.pull_request.head.sha }} | ||
|
||
- name: Free Disk Space | ||
uses: jlumbroso/free-disk-space@v1.3.1 | ||
with: | ||
tool-cache: false | ||
large-packages: false | ||
docker-images: false | ||
- name: Install vLLM build deps | ||
run: | | ||
sudo apt update | ||
sudo apt install --no-install-recommends -y \ | ||
libnuma-dev libdnnl-dev opencl-dev | ||
- name: Set up Python ${{ matrix.pyv }} | ||
uses: actions/setup-python@v5 | ||
with: | ||
python-version: ${{ matrix.pyv }} | ||
|
||
- name: Upgrade pip and nox | ||
run: | | ||
python -m pip install --upgrade pip nox | ||
pip --version | ||
nox --version | ||
- name: Lint code and check dependencies | ||
run: nox -v -s lint-${{ matrix.pyv }} | ||
|
||
- name: Run tests | ||
run: nox -v -s tests-${{ matrix.pyv }} -- --cov-report=xml | ||
env: | ||
VLLM_VERSION_OVERRIDE: ${{ matrix.vllm_version }} | ||
|
||
- name: Upload coverage report (Dependabot only) | ||
if: github.actor == 'dependabot[bot]' | ||
uses: codecov/codecov-action@v4 | ||
with: | ||
fail_ci_if_error: true | ||
env: | ||
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }} | ||
|
||
- name: Build package | ||
run: nox -s build-${{ matrix.pyv }} |
This file contains 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