Skip to content

Skipped E2E tests on CI-only changes#27055

Open
rob-ghost wants to merge 1 commit intomainfrom
chore/skip-e2e-on-ci-only-changes
Open

Skipped E2E tests on CI-only changes#27055
rob-ghost wants to merge 1 commit intomainfrom
chore/skip-e2e-on-ci-only-changes

Conversation

@rob-ghost
Copy link
Copy Markdown
Contributor

Problem

E2E tests run on every push regardless of what changed. A workflow-only or docs-only PR waits ~40 minutes for 8 E2E shards that can't possibly find regressions because no application code changed. This wastes CI minutes and slows down merges for infrastructure work.

Proposal

Add a new app-code path filter to job_setup that matches actual application code:

  • ghost/**, apps/**, e2e/**, package.json, yarn.lock

Gate job_e2e_tests on this filter. When no app code changes, e2e tests are skipped. The required check gate (All required tests passed or skipped) already handles skipped jobs — it only fails on failure or cancelled, not skipped.

Not Doing

  • Skipping other test jobs (unit, integration, lint) — those are already path-filtered via shared + package-specific filters.
  • Skipping job_build_artifacts — that always runs (needed for Docker image builds on main).
  • Changing the shared anchor that includes .github/** — other test jobs correctly re-run when workflows change since those changes could affect how tests execute.

Trade-offs

  • If a workflow change somehow breaks e2e tests (e.g., changing the e2e job's Docker image, environment variables, or sharding), it won't be caught until a subsequent PR that touches app code. This is a narrow window — the next app code PR will catch it.
  • The app-code filter is deliberately broad (ghost/**, apps/**). A tighter filter could skip more, but the risk of missing real regressions increases.

Rollback

  • Easy: Revert the one-line if: condition change on job_e2e_tests. No data migration, no downstream impact.

Blast Radius

  • CI only. No production impact.
  • PRs that only touch .github/, docs/, scripts/, or other non-app paths will merge faster.
  • PRs that touch any file under ghost/, apps/, e2e/, or dependency files (package.json, yarn.lock) are unaffected — e2e runs as before.

Context: E2E tests were running on every push regardless of what changed.
Added an `app-code` path filter that only matches actual application code
(ghost/, apps/, e2e/, package.json, yarn.lock), and gated the E2E job on
it. This avoids ~40 min of unnecessary E2E runs for documentation,
Tinybird, or other non-app changes.
@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai bot commented Apr 1, 2026

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

Run ID: 5fbb7f8f-249e-44cc-bd2e-0920389efbfa

📥 Commits

Reviewing files that changed from the base of the PR and between 8f2a678 and 63e74da.

📒 Files selected for processing (1)
  • .github/workflows/ci.yml

Walkthrough

The CI workflow configuration has been updated to include a new file-change filter in the job_setup job that monitors specific application directories and files (ghost/**, apps/**, e2e/**, package.json, yarn.lock). This filter's result is exposed as a new output called changed_app_code. The job_e2e_tests job condition has been modified to require both a non-tag push event and a positive result from the changed_app_code output before execution.

🚥 Pre-merge checks | ✅ 3
✅ Passed checks (3 passed)
Check name Status Explanation
Title check ✅ Passed The title 'Skipped E2E tests on CI-only changes' clearly and concisely summarizes the main change: adding a path filter to skip E2E tests when only CI/workflow changes are made, not application code.
Description check ✅ Passed The description thoroughly explains the problem, proposed solution, trade-offs, and rollback strategy. It directly relates to the changeset and provides comprehensive context for the PR's intent.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch chore/skip-e2e-on-ci-only-changes

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@sonarqubecloud
Copy link
Copy Markdown

sonarqubecloud bot commented Apr 1, 2026

@rob-ghost rob-ghost requested a review from 9larsons April 1, 2026 15:03
@codecov
Copy link
Copy Markdown

codecov bot commented Apr 1, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 73.25%. Comparing base (5beca11) to head (63e74da).
⚠️ Report is 18 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main   #27055      +/-   ##
==========================================
- Coverage   73.26%   73.25%   -0.02%     
==========================================
  Files        1530     1530              
  Lines      121767   121704      -63     
  Branches    14710    14704       -6     
==========================================
- Hits        89218    89152      -66     
- Misses      31555    31558       +3     
  Partials      994      994              
Flag Coverage Δ
admin-tests 54.41% <ø> (ø)
e2e-tests 73.25% <ø> (-0.02%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant