mirror of
https://github.com/google-gemini/gemini-cli.git
synced 2026-03-10 22:21:22 -07:00
feat(infra) - Make merge group and pushes run chained e2e (#11796)
Co-authored-by: gemini-cli-robot <gemini-cli-robot@google.com>
This commit is contained in:
58
.github/workflows/test_chained_e2e.yml
vendored
58
.github/workflows/test_chained_e2e.yml
vendored
@@ -1,6 +1,10 @@
|
|||||||
name: 'Test Chained E2E'
|
name: 'Test Chained E2E'
|
||||||
|
|
||||||
on:
|
on:
|
||||||
|
push:
|
||||||
|
branches:
|
||||||
|
- 'main'
|
||||||
|
merge_group:
|
||||||
workflow_run:
|
workflow_run:
|
||||||
workflows: ['Trigger E2E']
|
workflows: ['Trigger E2E']
|
||||||
types: ['completed']
|
types: ['completed']
|
||||||
@@ -36,11 +40,12 @@ jobs:
|
|||||||
|
|
||||||
download_repo_name:
|
download_repo_name:
|
||||||
runs-on: 'gemini-cli-ubuntu-16-core'
|
runs-on: 'gemini-cli-ubuntu-16-core'
|
||||||
|
if: "github.event_name == 'workflow_dispatch' || github.event_name == 'workflow_run'"
|
||||||
outputs:
|
outputs:
|
||||||
repo_name: '${{ steps.output-repo-name.outputs.repo_name }}'
|
repo_name: '${{ steps.output-repo-name.outputs.repo_name }}'
|
||||||
steps:
|
steps:
|
||||||
- name: 'Mock Repo Artifact'
|
- name: 'Mock Repo Artifact'
|
||||||
if: "${{ github.event_name != 'workflow_run' }}"
|
if: "${{ github.event_name == 'workflow_dispatch' }}"
|
||||||
env:
|
env:
|
||||||
REPO_NAME: '${{ github.event.inputs.repo_name }}'
|
REPO_NAME: '${{ github.event.inputs.repo_name }}'
|
||||||
run: |
|
run: |
|
||||||
@@ -71,24 +76,44 @@ jobs:
|
|||||||
const repo_name = String(fs.readFileSync(path.join(temp, 'repo_name')));
|
const repo_name = String(fs.readFileSync(path.join(temp, 'repo_name')));
|
||||||
core.setOutput('repo_name', repo_name);
|
core.setOutput('repo_name', repo_name);
|
||||||
|
|
||||||
|
parse_run_context:
|
||||||
|
name: 'Parse run context'
|
||||||
|
runs-on: 'gemini-cli-ubuntu-16-core'
|
||||||
|
needs: 'download_repo_name'
|
||||||
|
if: 'always()'
|
||||||
|
outputs:
|
||||||
|
repository: '${{ steps.set_context.outputs.REPO }}'
|
||||||
|
sha: '${{ steps.set_context.outputs.SHA }}'
|
||||||
|
steps:
|
||||||
|
- id: 'set_context'
|
||||||
|
name: 'Set dynamic repository and SHA'
|
||||||
|
env:
|
||||||
|
REPO: '${{ needs.download_repo_name.outputs.repo_name || github.repository }}'
|
||||||
|
SHA: '${{ github.event.inputs.head_sha || github.event.workflow_run.head_sha || github.sha }}'
|
||||||
|
shell: 'bash'
|
||||||
|
run: |
|
||||||
|
echo "REPO=$REPO" >> "$GITHUB_OUTPUT"
|
||||||
|
echo "SHA=$SHA" >> "$GITHUB_OUTPUT"
|
||||||
|
|
||||||
set_pending_status:
|
set_pending_status:
|
||||||
runs-on: 'gemini-cli-ubuntu-16-core'
|
runs-on: 'gemini-cli-ubuntu-16-core'
|
||||||
|
if: "github.event_name == 'workflow_dispatch' || github.event_name == 'workflow_run'"
|
||||||
needs:
|
needs:
|
||||||
- 'download_repo_name'
|
- 'parse_run_context'
|
||||||
steps:
|
steps:
|
||||||
- name: 'Set pending status'
|
- name: 'Set pending status'
|
||||||
uses: 'myrotvorets/set-commit-status-action@16037e056d73b2d3c88e37e393ff369047f70886' # ratchet:myrotvorets/set-commit-status-action@master
|
uses: 'myrotvorets/set-commit-status-action@16037e056d73b2d3c88e37e393ff369047f70886' # ratchet:myrotvorets/set-commit-status-action@master
|
||||||
if: 'always()'
|
if: 'always()'
|
||||||
with:
|
with:
|
||||||
allowForks: 'true'
|
allowForks: 'true'
|
||||||
repo: '${{ needs.download_repo_name.outputs.repo_name }}'
|
repo: '${{ needs.parse_run_context.outputs.repository }}'
|
||||||
sha: '${{ github.event.inputs.head_sha || github.event.workflow_run.head_sha }}'
|
sha: '${{ needs.parse_run_context.outputs.sha }}'
|
||||||
token: '${{ secrets.GITHUB_TOKEN }}'
|
token: '${{ secrets.GITHUB_TOKEN }}'
|
||||||
status: 'pending'
|
status: 'pending'
|
||||||
|
|
||||||
e2e_linux:
|
e2e_linux:
|
||||||
name: 'E2E Test (Linux) - ${{ matrix.sandbox }}'
|
name: 'E2E Test (Linux) - ${{ matrix.sandbox }}'
|
||||||
needs: 'download_repo_name'
|
needs: 'parse_run_context'
|
||||||
runs-on: 'gemini-cli-ubuntu-16-core'
|
runs-on: 'gemini-cli-ubuntu-16-core'
|
||||||
strategy:
|
strategy:
|
||||||
fail-fast: false
|
fail-fast: false
|
||||||
@@ -103,8 +128,8 @@ jobs:
|
|||||||
- name: 'Checkout'
|
- name: 'Checkout'
|
||||||
uses: 'actions/checkout@08eba0b27e820071cde6df949e0beb9ba4906955' # ratchet:actions/checkout@v5
|
uses: 'actions/checkout@08eba0b27e820071cde6df949e0beb9ba4906955' # ratchet:actions/checkout@v5
|
||||||
with:
|
with:
|
||||||
ref: '${{ github.event.inputs.head_sha || github.event.workflow_run.head_sha }}'
|
ref: '${{ needs.parse_run_context.outputs.sha }}'
|
||||||
repository: '${{ needs.download_repo_name.outputs.repo_name }}'
|
repository: '${{ needs.parse_run_context.outputs.repository }}'
|
||||||
|
|
||||||
- name: 'Set up Node.js ${{ matrix.node-version }}'
|
- name: 'Set up Node.js ${{ matrix.node-version }}'
|
||||||
uses: 'actions/setup-node@49933ea5288caeca8642d1e84afbd3f7d6820020' # ratchet:actions-node@v4
|
uses: 'actions/setup-node@49933ea5288caeca8642d1e84afbd3f7d6820020' # ratchet:actions-node@v4
|
||||||
@@ -136,14 +161,14 @@ jobs:
|
|||||||
|
|
||||||
e2e_mac:
|
e2e_mac:
|
||||||
name: 'E2E Test (macOS)'
|
name: 'E2E Test (macOS)'
|
||||||
needs: 'download_repo_name'
|
needs: 'parse_run_context'
|
||||||
runs-on: 'macos-latest'
|
runs-on: 'macos-latest'
|
||||||
steps:
|
steps:
|
||||||
- name: 'Checkout'
|
- name: 'Checkout'
|
||||||
uses: 'actions/checkout@08eba0b27e820071cde6df949e0beb9ba4906955' # ratchet:actions/checkout@v5
|
uses: 'actions/checkout@08eba0b27e820071cde6df949e0beb9ba4906955' # ratchet:actions/checkout@v5
|
||||||
with:
|
with:
|
||||||
ref: '${{ github.event.inputs.head_sha || github.event.workflow_run.head_sha }}'
|
ref: '${{ needs.parse_run_context.outputs.sha }}'
|
||||||
repository: '${{ needs.download_repo_name.outputs.repo_name }}'
|
repository: '${{ needs.parse_run_context.outputs.repository }}'
|
||||||
|
|
||||||
- name: 'Set up Node.js 20.x'
|
- name: 'Set up Node.js 20.x'
|
||||||
uses: 'actions/setup-node@49933ea5288caeca8642d1e84afbd3f7d6820020' # ratchet:actions-node@v4
|
uses: 'actions/setup-node@49933ea5288caeca8642d1e84afbd3f7d6820020' # ratchet:actions-node@v4
|
||||||
@@ -173,7 +198,7 @@ jobs:
|
|||||||
name: 'Slow E2E - Win'
|
name: 'Slow E2E - Win'
|
||||||
needs:
|
needs:
|
||||||
- 'merge_queue_skipper'
|
- 'merge_queue_skipper'
|
||||||
- 'download_repo_name'
|
- 'parse_run_context'
|
||||||
if: |
|
if: |
|
||||||
needs.merge_queue_skipper.outputs.skip == 'false'
|
needs.merge_queue_skipper.outputs.skip == 'false'
|
||||||
runs-on: 'gemini-cli-windows-16-core'
|
runs-on: 'gemini-cli-windows-16-core'
|
||||||
@@ -183,8 +208,8 @@ jobs:
|
|||||||
- name: 'Checkout'
|
- name: 'Checkout'
|
||||||
uses: 'actions/checkout@08eba0b27e820071cde6df949e0beb9ba4906955' # ratchet:actions/checkout@v5
|
uses: 'actions/checkout@08eba0b27e820071cde6df949e0beb9ba4906955' # ratchet:actions/checkout@v5
|
||||||
with:
|
with:
|
||||||
ref: '${{ github.event.inputs.head_sha || github.event.workflow_run.head_sha }}'
|
ref: '${{ needs.parse_run_context.outputs.sha }}'
|
||||||
repository: '${{ needs.download_repo_name.outputs.repo_name }}'
|
repository: '${{ needs.parse_run_context.outputs.repository }}'
|
||||||
|
|
||||||
- name: 'Set up Node.js 20.x'
|
- name: 'Set up Node.js 20.x'
|
||||||
uses: 'actions/setup-node@49933ea5288caeca8642d1e84afbd3f7d6820020' # ratchet:actions-node@v4
|
uses: 'actions/setup-node@49933ea5288caeca8642d1e84afbd3f7d6820020' # ratchet:actions-node@v4
|
||||||
@@ -251,8 +276,9 @@ jobs:
|
|||||||
|
|
||||||
set_workflow_status:
|
set_workflow_status:
|
||||||
runs-on: 'gemini-cli-ubuntu-16-core'
|
runs-on: 'gemini-cli-ubuntu-16-core'
|
||||||
|
if: "github.event_name == 'workflow_dispatch' || github.event_name == 'workflow_run'"
|
||||||
needs:
|
needs:
|
||||||
- 'download_repo_name'
|
- 'parse_run_context'
|
||||||
- 'e2e'
|
- 'e2e'
|
||||||
steps:
|
steps:
|
||||||
- name: 'Set workflow status'
|
- name: 'Set workflow status'
|
||||||
@@ -260,7 +286,7 @@ jobs:
|
|||||||
if: 'always()'
|
if: 'always()'
|
||||||
with:
|
with:
|
||||||
allowForks: 'true'
|
allowForks: 'true'
|
||||||
repo: '${{ needs.download_repo_name.outputs.repo_name }}'
|
repo: '${{ needs.parse_run_context.outputs.repository }}'
|
||||||
sha: '${{ github.event.inputs.head_sha || github.event.workflow_run.head_sha }}'
|
sha: '${{ needs.parse_run_context.outputs.sha }}'
|
||||||
token: '${{ secrets.GITHUB_TOKEN }}'
|
token: '${{ secrets.GITHUB_TOKEN }}'
|
||||||
status: '${{ job.status }}'
|
status: '${{ job.status }}'
|
||||||
|
|||||||
Reference in New Issue
Block a user