diff --git a/.github/workflows/execute-notebook.yml b/.github/workflows/execute-notebook.yml index b1b7680dc..b24fe8c81 100644 --- a/.github/workflows/execute-notebook.yml +++ b/.github/workflows/execute-notebook.yml @@ -3,10 +3,12 @@ name: Execute Notebooks on: pull_request: branches: [ main ] - types: [synchronize, labeled] + types: [opened, synchronize, reopened, labeled] paths: - "python/sglang/**" - "docs/**" + - "!python/sglang/**/*.md" + - "!docs/**/*.md" workflow_dispatch: @@ -18,9 +20,16 @@ env: SGLANG_IS_IN_CI: true jobs: + call-gate: + # Align with PR Test: fail fast if PR doesn't have run-ci label. + # This makes /tag-and-rerun-ci work by rerunning this failed workflow. + uses: ./.github/workflows/pr-gate.yml + secrets: inherit + run-all-notebooks: + needs: [call-gate] runs-on: 1-gpu-runner - if: github.event_name != 'pull_request' || contains(github.event.pull_request.labels.*.name, 'run-ci') + if: github.event_name != 'pull_request' || needs.call-gate.result == 'success' steps: - name: Checkout code uses: actions/checkout@v4 @@ -46,9 +55,11 @@ jobs: notebook-finish: needs: [ + call-gate, run-all-notebooks ] runs-on: ubuntu-latest + if: always() && needs.run-all-notebooks.result != 'skipped' steps: - name: Check all dependent job statuses run: |