Skip to content

github-workflows: Ensure e2e workflow can be used as merge checks#121

Merged
ganto merged 3 commits intomainfrom
feature/e2e-tests
Mar 24, 2026
Merged

github-workflows: Ensure e2e workflow can be used as merge checks#121
ganto merged 3 commits intomainfrom
feature/e2e-tests

Conversation

@ganto
Copy link
Owner

@ganto ganto commented Mar 24, 2026

No description provided.

@ganto ganto added the github_actions Pull requests that update GitHub Actions code label Mar 24, 2026
@ganto ganto requested a review from Copilot March 24, 2026 22:23
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Updates the E2E GitHub Actions workflow so it can participate in PR merge gating by creating/updating a commit status context (e2e) while keeping the actual E2E execution manually triggered.

Changes:

  • Trigger the workflow on pull_request in addition to workflow_dispatch.
  • Add a set-pending job to post a pending commit status (context: e2e) on PRs.
  • Add a report-status job to post success/failure commit status after manual E2E runs.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment on lines 4 to +18
on:
workflow_dispatch:
pull_request:

permissions:
contents: read
statuses: write

jobs:

set-pending:
if: github.event_name == 'pull_request'
runs-on: ubuntu-latest
name: Set pending e2e status
steps:
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.
ganto and others added 3 commits March 24, 2026 23:47
Distinguish between test failures and cancelled/skipped runs in the
commit status reported to PRs. Cancelled and skipped results now map
to GitHub's "error" state with descriptive messages instead of being
reported as failures.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Switch from pull_request to pull_request_target so the GITHUB_TOKEN
has write access to commit statuses even for fork PRs. The job only
posts a status and never checks out PR code, so this is safe.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@ganto ganto force-pushed the feature/e2e-tests branch from 28c7da8 to b9c5b2c Compare March 24, 2026 22:48
@ganto ganto merged commit a7e4756 into main Mar 24, 2026
7 checks passed
@ganto ganto deleted the feature/e2e-tests branch March 24, 2026 22:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

github_actions Pull requests that update GitHub Actions code

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants