Skip to content

Refine vllm inference and keep the API same as non-vllm #49

Refine vllm inference and keep the API same as non-vllm

Refine vllm inference and keep the API same as non-vllm #49

Workflow file for this run

name: Unit Tests
on:
workflow_dispatch:
pull_request_review:
types: [submitted]
branches:
- main
paths-ignore:
- 'docs/**'
push:
branches:
- main
paths-ignore:
- 'docs/**'
tags:
- v[0-9]+.[0-9]+.[0-9]+
concurrency:
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
cancel-in-progress: true
jobs:
run-shell-script:
if: github.event.review.state == 'approved'
runs-on: self-hosted
steps:
- name: Check for 2 approvals
id: approvals
run: |
REVIEW_API_URL="https://api.github.com/repos/${{ github.repository }}/pulls/${{ github.event.pull_request.number }}/reviews"
reviews=$(curl -s -H "Authorization: token ${{ secrets._GITHUB_TOKEN }}" $REVIEW_API_URL)
approve_count=$(echo "$reviews" | jq '[.[] | select(.state == "APPROVED")] | length')
echo "approve_count=$approve_count" >> $GITHUB_ENV
- name: Checkout code
uses: actions/checkout@v3
- name: Run unit test
if: env.approve_count == '2'
run: |
docker pull $UT_IMAGE
docker run -v $PWD:$PWD -w $PWD --net host --ipc host --shm-size 80G -t --rm --gpus all $UT_IMAGE bash -c 'make test'
env:
UT_IMAGE: ${{ secrets.UT_IMAGE }}