Unverified Commit 263c9236 authored by Lianmin Zheng's avatar Lianmin Zheng Committed by GitHub
Browse files

Always trigger pr-test (#8527)

parent 6478831b
...@@ -3,18 +3,8 @@ name: PR Test ...@@ -3,18 +3,8 @@ name: PR Test
on: on:
push: push:
branches: [ main ] branches: [ main ]
paths:
- "python/**"
- "scripts/**"
- "test/**"
- ".github/workflows/pr-test.yml"
pull_request: pull_request:
branches: [ main ] branches: [ main ]
paths:
- "python/**"
- "scripts/**"
- "test/**"
- ".github/workflows/pr-test.yml"
workflow_dispatch: workflow_dispatch:
inputs: inputs:
version: version:
...@@ -31,9 +21,30 @@ concurrency: ...@@ -31,9 +21,30 @@ concurrency:
cancel-in-progress: true cancel-in-progress: true
jobs: jobs:
check-changes:
runs-on: ubuntu-latest
outputs:
src: ${{ steps.filter.outputs.src }}
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Detect file changes
id: filter
uses: dorny/paths-filter@v3
with:
filters: |
src:
- "python/**"
- "scripts/**"
- "test/**"
- ".github/workflows/pr-test.yml"
unit-test-frontend: unit-test-frontend:
needs: check-changes
if: (github.repository == 'sgl-project/sglang' || github.event_name == 'pull_request') && if: (github.repository == 'sgl-project/sglang' || github.event_name == 'pull_request') &&
github.event.pull_request.draft == false github.event.pull_request.draft == false &&
needs.check-changes.outputs.src == 'true'
runs-on: 1-gpu-runner runs-on: 1-gpu-runner
steps: steps:
- name: Checkout code - name: Checkout code
...@@ -50,8 +61,10 @@ jobs: ...@@ -50,8 +61,10 @@ jobs:
python3 run_suite.py --suite per-commit python3 run_suite.py --suite per-commit
unit-test-backend-1-gpu: unit-test-backend-1-gpu:
needs: check-changes
if: (github.repository == 'sgl-project/sglang' || github.event_name == 'pull_request') && if: (github.repository == 'sgl-project/sglang' || github.event_name == 'pull_request') &&
github.event.pull_request.draft == false github.event.pull_request.draft == false &&
needs.check-changes.outputs.src == 'true'
runs-on: 1-gpu-runner runs-on: 1-gpu-runner
strategy: strategy:
fail-fast: false fail-fast: false
...@@ -72,8 +85,10 @@ jobs: ...@@ -72,8 +85,10 @@ jobs:
python3 run_suite.py --suite per-commit --auto-partition-id ${{ matrix.part }} --auto-partition-size 10 python3 run_suite.py --suite per-commit --auto-partition-id ${{ matrix.part }} --auto-partition-size 10
unit-test-backend-2-gpu: unit-test-backend-2-gpu:
needs: check-changes
if: (github.repository == 'sgl-project/sglang' || github.event_name == 'pull_request') && if: (github.repository == 'sgl-project/sglang' || github.event_name == 'pull_request') &&
github.event.pull_request.draft == false github.event.pull_request.draft == false &&
needs.check-changes.outputs.src == 'true'
runs-on: 2-gpu-runner runs-on: 2-gpu-runner
steps: steps:
- name: Checkout code - name: Checkout code
...@@ -90,9 +105,10 @@ jobs: ...@@ -90,9 +105,10 @@ jobs:
python3 run_suite.py --suite per-commit-2-gpu python3 run_suite.py --suite per-commit-2-gpu
unit-test-backend-4-gpu: unit-test-backend-4-gpu:
needs: [check-changes, unit-test-frontend, unit-test-backend-2-gpu]
if: (github.repository == 'sgl-project/sglang' || github.event_name == 'pull_request') && if: (github.repository == 'sgl-project/sglang' || github.event_name == 'pull_request') &&
github.event.pull_request.draft == false github.event.pull_request.draft == false &&
needs: [unit-test-frontend, unit-test-backend-2-gpu] needs.check-changes.outputs.src == 'true'
runs-on: 4-gpu-runner runs-on: 4-gpu-runner
steps: steps:
- name: Checkout code - name: Checkout code
...@@ -109,9 +125,10 @@ jobs: ...@@ -109,9 +125,10 @@ jobs:
python3 run_suite.py --suite per-commit-4-gpu python3 run_suite.py --suite per-commit-4-gpu
unit-test-backend-8-gpu: unit-test-backend-8-gpu:
needs: [check-changes, unit-test-frontend, unit-test-backend-2-gpu]
if: (github.repository == 'sgl-project/sglang' || github.event_name == 'pull_request') && if: (github.repository == 'sgl-project/sglang' || github.event_name == 'pull_request') &&
github.event.pull_request.draft == false github.event.pull_request.draft == false &&
needs: [unit-test-frontend, unit-test-backend-2-gpu] needs.check-changes.outputs.src == 'true'
runs-on: 8-gpu-runner runs-on: 8-gpu-runner
strategy: strategy:
fail-fast: false fail-fast: false
...@@ -132,8 +149,10 @@ jobs: ...@@ -132,8 +149,10 @@ jobs:
python3 run_suite.py --suite per-commit-8-gpu --auto-partition-id ${{ matrix.part }} --auto-partition-size 2 python3 run_suite.py --suite per-commit-8-gpu --auto-partition-id ${{ matrix.part }} --auto-partition-size 2
performance-test-1-gpu-part-1: performance-test-1-gpu-part-1:
needs: check-changes
if: (github.repository == 'sgl-project/sglang' || github.event_name == 'pull_request') && if: (github.repository == 'sgl-project/sglang' || github.event_name == 'pull_request') &&
github.event.pull_request.draft == false github.event.pull_request.draft == false &&
needs.check-changes.outputs.src == 'true'
runs-on: 1-gpu-runner runs-on: 1-gpu-runner
steps: steps:
- name: Checkout code - name: Checkout code
...@@ -182,8 +201,10 @@ jobs: ...@@ -182,8 +201,10 @@ jobs:
python3 -m unittest test_bench_serving.TestBenchServing.test_lora_online_latency_with_concurrent_adapter_updates python3 -m unittest test_bench_serving.TestBenchServing.test_lora_online_latency_with_concurrent_adapter_updates
performance-test-1-gpu-part-2: performance-test-1-gpu-part-2:
needs: check-changes
if: (github.repository == 'sgl-project/sglang' || github.event_name == 'pull_request') && if: (github.repository == 'sgl-project/sglang' || github.event_name == 'pull_request') &&
github.event.pull_request.draft == false github.event.pull_request.draft == false &&
needs.check-changes.outputs.src == 'true'
runs-on: 1-gpu-runner runs-on: 1-gpu-runner
steps: steps:
- name: Checkout code - name: Checkout code
...@@ -224,8 +245,10 @@ jobs: ...@@ -224,8 +245,10 @@ jobs:
python3 -m unittest test_bench_serving.TestBenchServing.test_vlm_online_latency python3 -m unittest test_bench_serving.TestBenchServing.test_vlm_online_latency
performance-test-2-gpu: performance-test-2-gpu:
needs: check-changes
if: (github.repository == 'sgl-project/sglang' || github.event_name == 'pull_request') && if: (github.repository == 'sgl-project/sglang' || github.event_name == 'pull_request') &&
github.event.pull_request.draft == false github.event.pull_request.draft == false &&
needs.check-changes.outputs.src == 'true'
runs-on: 2-gpu-runner runs-on: 2-gpu-runner
steps: steps:
- name: Checkout code - name: Checkout code
...@@ -272,8 +295,10 @@ jobs: ...@@ -272,8 +295,10 @@ jobs:
python3 -m unittest test_bench_serving.TestBenchServing.test_pp_long_context_prefill python3 -m unittest test_bench_serving.TestBenchServing.test_pp_long_context_prefill
accuracy-test-1-gpu: accuracy-test-1-gpu:
needs: check-changes
if: (github.repository == 'sgl-project/sglang' || github.event_name == 'pull_request') && if: (github.repository == 'sgl-project/sglang' || github.event_name == 'pull_request') &&
github.event.pull_request.draft == false github.event.pull_request.draft == false &&
needs.check-changes.outputs.src == 'true'
runs-on: 1-gpu-runner runs-on: 1-gpu-runner
steps: steps:
- name: Checkout code - name: Checkout code
...@@ -293,8 +318,10 @@ jobs: ...@@ -293,8 +318,10 @@ jobs:
python3 test_eval_accuracy_large.py python3 test_eval_accuracy_large.py
accuracy-test-2-gpu: accuracy-test-2-gpu:
needs: check-changes
if: (github.repository == 'sgl-project/sglang' || github.event_name == 'pull_request') && if: (github.repository == 'sgl-project/sglang' || github.event_name == 'pull_request') &&
github.event.pull_request.draft == false github.event.pull_request.draft == false &&
needs.check-changes.outputs.src == 'true'
runs-on: 2-gpu-runner runs-on: 2-gpu-runner
steps: steps:
- name: Checkout code - name: Checkout code
...@@ -314,8 +341,10 @@ jobs: ...@@ -314,8 +341,10 @@ jobs:
python3 test_moe_eval_accuracy_large.py python3 test_moe_eval_accuracy_large.py
unit-test-deepep-4-gpu: unit-test-deepep-4-gpu:
needs: check-changes
if: (github.repository == 'sgl-project/sglang' || github.event_name == 'pull_request') && if: (github.repository == 'sgl-project/sglang' || github.event_name == 'pull_request') &&
github.event.pull_request.draft == false github.event.pull_request.draft == false &&
needs.check-changes.outputs.src == 'true'
runs-on: 4-gpu-runner runs-on: 4-gpu-runner
steps: steps:
- name: Checkout code - name: Checkout code
...@@ -332,12 +361,11 @@ jobs: ...@@ -332,12 +361,11 @@ jobs:
python3 run_suite.py --suite per-commit-4-gpu-deepep python3 run_suite.py --suite per-commit-4-gpu-deepep
unit-test-deepep-8-gpu: unit-test-deepep-8-gpu:
needs: [check-changes, unit-test-deepep-4-gpu]
if: (github.repository == 'sgl-project/sglang' || github.event_name == 'pull_request') && if: (github.repository == 'sgl-project/sglang' || github.event_name == 'pull_request') &&
github.event.pull_request.draft == false github.event.pull_request.draft == false &&
needs.check-changes.outputs.src == 'true'
runs-on: 8-gpu-runner runs-on: 8-gpu-runner
needs: [
unit-test-deepep-4-gpu,
]
steps: steps:
- name: Checkout code - name: Checkout code
uses: actions/checkout@v4 uses: actions/checkout@v4
...@@ -353,12 +381,13 @@ jobs: ...@@ -353,12 +381,13 @@ jobs:
python3 run_suite.py --suite per-commit-8-gpu-deepep python3 run_suite.py --suite per-commit-8-gpu-deepep
pr-test-finish: pr-test-finish:
if: always()
needs: [ needs: [
check-changes,
unit-test-frontend, unit-test-backend-1-gpu, unit-test-backend-2-gpu, unit-test-backend-4-gpu, unit-test-frontend, unit-test-backend-1-gpu, unit-test-backend-2-gpu, unit-test-backend-4-gpu,
unit-test-backend-8-gpu, performance-test-1-gpu-part-1, performance-test-1-gpu-part-2, performance-test-2-gpu, unit-test-backend-8-gpu, performance-test-1-gpu-part-1, performance-test-1-gpu-part-2, performance-test-2-gpu,
accuracy-test-1-gpu, accuracy-test-2-gpu, unit-test-deepep-4-gpu, unit-test-deepep-8-gpu, accuracy-test-1-gpu, accuracy-test-2-gpu, unit-test-deepep-4-gpu, unit-test-deepep-8-gpu,
] ]
if: needs.check-changes.outputs.src == 'true'
runs-on: ubuntu-latest runs-on: ubuntu-latest
steps: steps:
- name: Check all dependent job statuses - name: Check all dependent job statuses
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment