Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
50 changes: 50 additions & 0 deletions .github/workflows/e2e.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,13 +3,30 @@ name: E2E Tests

on:
workflow_dispatch:
pull_request_target:

permissions:
contents: read
statuses: write

jobs:

set-pending:
if: github.event_name == 'pull_request_target'
runs-on: ubuntu-latest
name: Set pending e2e status
steps:
Comment on lines 4 to +18
Copy link

Copilot AI Mar 24, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

On pull_request events this workflow will complete with a green check (only set-pending runs). If branch protection is configured to require the Actions check "E2E Tests", PRs could merge without ever running E2E—only the legacy commit status context e2e would remain pending. To avoid misconfiguration, consider renaming the workflow/check to match the required status context and/or documenting that branch protection must require the e2e status (not the workflow check).

Copilot uses AI. Check for mistakes.
- name: Set pending e2e status
run: |
gh api "repos/${{ github.repository }}/statuses/${{ github.event.pull_request.head.sha }}" \
-f state="pending" \
-f context="e2e" \
-f description="E2E tests must be triggered manually via workflow_dispatch"
env:
GH_TOKEN: ${{ github.token }}

e2e:
if: github.event_name == 'workflow_dispatch'
runs-on: ubuntu-latest
timeout-minutes: 5

Expand Down Expand Up @@ -55,3 +72,36 @@ jobs:
E2E_RELEASE: ${{ matrix.release }}
CONTAINER_RUNTIME: docker
run: go test -tags e2e -v -race -timeout 5m -run ${{ matrix.test }} ./test/e2e/

report-status:
if: always() && github.event_name == 'workflow_dispatch'
needs: [e2e]
runs-on: ubuntu-latest
name: Report e2e status
steps:
- name: Report e2e status
run: |
case "${{ needs.e2e.result }}" in
success)
state="success"
description="All E2E tests passed"
;;
cancelled)
state="error"
description="E2E tests were cancelled"
;;
skipped)
state="error"
description="E2E tests were skipped"
;;
*)
state="failure"
description="E2E tests failed"
;;
esac
gh api "repos/${{ github.repository }}/statuses/${{ github.sha }}" \
-f state="$state" \
-f context="e2e" \
-f description="$description"
env:
GH_TOKEN: ${{ github.token }}
Loading