add tests #1
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
name: Test | |
on: | |
push: | |
branches: [ main ] | |
pull_request: | |
branches: [ main ] | |
jobs: | |
test: | |
runs-on: ubuntu-latest | |
services: | |
vllm: | |
image: vllm/vllm-openai:latest | |
options: >- | |
--ipc=host | |
env: | |
MODEL: HuggingFaceTB/SmolLM2-135M-Instruct | |
ports: | |
- 8000:8000 | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Set up Node.js | |
uses: actions/setup-node@v3 | |
with: | |
node-version: '18' | |
cache: 'npm' | |
- name: Install dependencies | |
run: npm ci | |
- name: Wait for vLLM to be ready | |
run: | | |
timeout 300 bash -c ' | |
until curl -s http://localhost:8000/health; do | |
echo "Waiting for vLLM..." | |
sleep 5 | |
done' | |
- name: Run tests | |
run: npm test |