Files
openobserve/tests
Shrinath RaoandClaude Opus 4.8 62a8f3f30b ci: gate Playwright + API tests behind an 'e2e' label + auto-bypass non-code changes (#13014)
## What

Gate the full **Playwright (UI)** and **API** test suites on PRs behind
a single **`e2e` label**, and **auto-bypass** PRs that only touch files
which can't affect those suites. Covers `playwright.yml` and
`api-testing.yml`.

## Behaviour (both suites)

| Situation | build/test jobs | summary check (`playwright_summary` /
`api_tests_summary`) | Mergeable? |
|---|---|---|---|
| PR with `e2e` label | full suite runs | green if tests pass | ✅ if
green |
| PR, no label, relevant code changed | skipped | **fails** ("add `e2e`
label") | ❌ blocked |
| PR, no label, docs/meta only | skipped | **passes** (auto-bypass) | ✅
|
| Remove the `e2e` label | skipped (fresh run) | **fails** again | ❌
until re-added |
| push to `main` / merge queue / dispatch | full suite runs | green if
tests pass | n/a |

One `e2e` label runs **both** UI + API. `push`, `merge_group`, and
`workflow_dispatch` are never label-gated.

## Why the gate lives in the summary job

A job that `if:`-skips reports `skipped`, which branch protection treats
as **pass**. So a no-label PR can't be blocked by merely skipping jobs —
the summary job **actively fails** when the change is relevant and the
`e2e` label is absent.

## Auto-bypass (`check_changes`)

No label needed for: `*.md/.mdx/.markdown/.rst/.adoc`, `docs/`,
images/media, `LICENSE/NOTICE/AUTHORS/CONTRIBUTORS/CHANGELOG/.mailmap`,
`CODEOWNERS`, GitHub issue/PR/funding templates,
`dependabot`/`renovate`,
`.gitignore/.gitattributes/.editorconfig/.gitkeep/.husky/.vscode/.idea`.
The **API** workflow additionally bypasses `web/` + UI-test dirs
(frontend changes don't affect API tests).

**Not** bypassed (still trigger): `.github/workflows/**` (incl. these
workflow files), source, `package*.json`/lockfiles, configs, `*.txt`.

## Rollout prerequisites

- Create the **`e2e`** label in this repo.
- Required status checks = **`playwright_summary`** and
**`api_tests_summary`** — the individual shard jobs must NOT be required
(they legitimately skip and would auto-pass).

Sibling PR on the other repo uses the same branch `ci/e2e-label-gate`.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

---------

Co-authored-by: Claude Opus 4.8 <noreply@anthropic.com>
2026-07-03 08:41:01 +00:00
..
2024-09-22 17:57:47 +08:00