From d991c4607dc580f27bbfb9e15209852cbafc11f7 Mon Sep 17 00:00:00 2001 From: shishu314 Date: Tue, 30 Sep 2025 14:58:56 -0400 Subject: [PATCH] feat(infra)- Use queue skipper for CI (#9773) Co-authored-by: Shi Shu Co-authored-by: matt korwel --- .github/workflows/ci.yml | 24 +++++++++++++++++++++++- .github/workflows/e2e.yml | 29 +++++++++++++++++++++++------ 2 files changed, 46 insertions(+), 7 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index f7a7f18ce4..24cf93fcc4 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -33,9 +33,22 @@ defaults: shell: 'bash' jobs: + merge_queue_skipper: + name: 'Merge Queue Skipper' + runs-on: 'gemini-cli-ubuntu-16-core' + outputs: + skip: '${{ steps.merge-queue-ci-skipper.outputs.skip-check }}' + steps: + - id: 'merge-queue-ci-skipper' + uses: 'cariad-tech/merge-queue-ci-skipper@1032489e59437862c90a08a2c92809c903883772' # ratchet:cariad-tech/merge-queue-ci-skipper@main + with: + secret: '${{ secrets.GITHUB_TOKEN }}' + lint: name: 'Lint' runs-on: 'gemini-cli-ubuntu-16-core' + needs: 'merge_queue_skipper' + if: "${{needs.merge_queue_skipper.outputs.skip == 'false'}}" steps: - name: 'Checkout' uses: 'actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8' # ratchet:actions/checkout@v5 @@ -78,6 +91,8 @@ jobs: runs-on: 'gemini-cli-ubuntu-16-core' needs: - 'lint' + - 'merge_queue_skipper' + if: "${{needs.merge_queue_skipper.outputs.skip == 'false'}}" permissions: contents: 'read' checks: 'write' @@ -135,6 +150,8 @@ jobs: runs-on: '${{ matrix.os }}' needs: - 'lint' + - 'merge_queue_skipper' + if: "${{needs.merge_queue_skipper.outputs.skip == 'false'}}" permissions: contents: 'read' checks: 'write' @@ -201,6 +218,8 @@ jobs: codeql: name: 'CodeQL' runs-on: 'gemini-cli-ubuntu-16-core' + needs: 'merge_queue_skipper' + if: "${{needs.merge_queue_skipper.outputs.skip == 'false'}}" permissions: actions: 'read' contents: 'read' @@ -222,7 +241,8 @@ jobs: # Check for changes in bundle size. bundle_size: name: 'Check Bundle Size' - if: "github.event_name == 'pull_request'" + needs: 'merge_queue_skipper' + if: "${{github.event_name == 'pull_request' && needs.merge_queue_skipper.outputs.skip == 'false'}}" runs-on: 'gemini-cli-ubuntu-16-core' permissions: contents: 'read' # For checkout @@ -246,6 +266,8 @@ jobs: test_windows: name: 'Slow Test - Win' runs-on: 'gemini-cli-windows-16-core' + needs: 'merge_queue_skipper' + if: "${{needs.merge_queue_skipper.outputs.skip == 'false'}}" continue-on-error: true steps: diff --git a/.github/workflows/e2e.yml b/.github/workflows/e2e.yml index eadc3abfb0..40feb87df9 100644 --- a/.github/workflows/e2e.yml +++ b/.github/workflows/e2e.yml @@ -27,14 +27,27 @@ concurrency: ${{ github.ref != 'refs/heads/main' && !startsWith(github.ref, 'refs/heads/release/') }} jobs: + merge_queue_skipper: + name: 'Merge Queue Skipper' + runs-on: 'gemini-cli-ubuntu-16-core' + outputs: + skip: '${{ steps.merge-queue-e2e-skipper.outputs.skip-check }}' + steps: + - id: 'merge-queue-e2e-skipper' + uses: 'cariad-tech/merge-queue-ci-skipper@1032489e59437862c90a08a2c92809c903883772' # ratchet:cariad-tech/merge-queue-ci-skipper@main + with: + secret: '${{ secrets.GITHUB_TOKEN }}' + e2e_linux: name: 'E2E Test (Linux) - ${{ matrix.sandbox }}' + needs: 'merge_queue_skipper' if: | - github.event_name == 'push' || + needs.merge_queue_skipper.outputs.skip == 'false' && + (github.event_name == 'push' || github.event_name == 'merge_group' || github.event_name == 'workflow_dispatch' || (github.event.pull_request.head.repo.full_name == github.repository) || - (github.event.label.name == 'maintainer:e2e:ok') + (github.event.label.name == 'maintainer:e2e:ok')) runs-on: 'gemini-cli-ubuntu-16-core' strategy: fail-fast: false @@ -89,12 +102,14 @@ jobs: e2e_mac: name: 'E2E Test (macOS)' + needs: 'merge_queue_skipper' if: | - github.event_name == 'push' || + needs.merge_queue_skipper.outputs.skip == 'false' && + (github.event_name == 'push' || github.event_name == 'merge_group' || github.event_name == 'workflow_dispatch' || (github.event.pull_request.head.repo.full_name == github.repository) || - (github.event.label.name == 'maintainer:e2e:ok') + (github.event.label.name == 'maintainer:e2e:ok')) runs-on: 'macos-latest' steps: - name: 'Checkout (fork)' @@ -136,12 +151,14 @@ jobs: e2e_windows: name: 'Slow E2E - Win' + needs: 'merge_queue_skipper' if: | - github.event_name == 'push' || + needs.merge_queue_skipper.outputs.skip == 'false' && + (github.event_name == 'push' || github.event_name == 'merge_group' || github.event_name == 'workflow_dispatch' || (github.event.pull_request.head.repo.full_name == github.repository) || - (github.event.label.name == 'maintainer:e2e:ok') + (github.event.label.name == 'maintainer:e2e:ok')) runs-on: 'gemini-cli-windows-16-core' continue-on-error: true