Files
sglang/.github/workflows/unit-test.yml
Yineng Zhang c8423ca311 ci: update timeout and retry (#1086)
Co-authored-by: Liangsheng Yin <hnyls2002@gmail.com>
2024-08-14 00:27:35 -07:00

53 lines
1.2 KiB
YAML

name: Unit Test
on:
push:
branches: [ main ]
paths:
- "python/sglang/**"
- "test/**"
- ".github/workflows/unit-test.yml"
pull_request:
branches: [ main ]
paths:
- "python/sglang/**"
- "test/**"
- ".github/workflows/unit-test.yml"
workflow_dispatch:
concurrency:
group: unit-test-${{ github.ref }}
cancel-in-progress: true
jobs:
unit-test:
if: github.repository == 'sgl-project/sglang' || github.event_name == 'pull_request'
runs-on: unit
steps:
- name: Checkout code
uses: actions/checkout@v3
- name: Install dependencies
run: |
source $HOME/venv/bin/activate
echo "$HOME/venv/bin" >> $GITHUB_PATH
pip install --upgrade pip
pip install -e "python[all]"
pip install flashinfer -i https://flashinfer.ai/whl/cu121/torch2.4/ --force-reinstall
pip install accelerate
pip install sentence_transformers
- name: Test Backend Runtime
run: |
cd test/srt
python3 run_suite.py --suite minimal
timeout-minutes: 15
- name: Test Frontend Language
run: |
cd test/lang
python3 run_suite.py --suite minimal
timeout-minutes: 10