Skip to content

ci: Add file change detection to workflows - #7524

Merged
alexander-alderman-webb merged 3 commits into
getsentry:masterfrom
safina57:ci/skip-tests-on-docs-only-changes
Nov 12, 2026
Merged

alexander-alderman-webb merged 3 commits into
getsentry:masterfrom
safina57:ci/skip-tests-on-docs-only-changes

Conversation

@safina57

Copy link
Copy Markdown
Contributor

Description

Adds a files-changed job to the test orchestrator that detects whether a PR touches anything beyond docs (markdown, docs/, LICENSE, .agents/, issue templates, CODEOWNERS). Each test group, and the coverage report job, now needs it and only runs when code changed. Docs-only PRs skip every group; check-required still reports, so the required status check keeps working. Pushes to master and release branches always run the full suite.

Tested on my fork with mock PRs: a CHANGELOG.md-only change skipped all groups and the coverage report while "All tests passed" stayed green, and a pyproject.toml-only change ran the full suite.

Issues

@alexander-alderman-webb

Copy link
Copy Markdown
Collaborator

This won't work because the tests are required jobs.

@safina57

Copy link
Copy Markdown
Contributor Author

@alexander-alderman-webb the only test-related required check is All tests passed, not the individual groups and that job keeps if: always() and isn't gated on files-changed, so it always runs and reports, skipped groups don't count as failure/cancelled, so it goes green on docs-only PRs. The report job is gated too so it doesn't try to combine non-existent coverage, verified this by making a change in a **.md file where PR skipped all groups and All tests passed succeeded, https://github.com/safina57/sentry-python/actions/runs/35128371710, and another one where I made a change on pyproject.toml and the gate worked as intended https://github.com/safina57/sentry-python/actions/runs/35128878739/job/104904614766

@alexander-alderman-webb
alexander-alderman-webb marked this pull request as ready for review November 12, 2026 15:02
@alexander-alderman-webb
alexander-alderman-webb requested a review from a team as a code owner November 12, 2026 15:02
@alexander-alderman-webb alexander-alderman-webb changed the title feat(ci): Add file change detection to workflows ci: Add file change detection to workflows Nov 12, 2026
@alexander-alderman-webb
alexander-alderman-webb merged commit c12eb30 into getsentry:master Nov 12, 2026
321 of 323 checks passed
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.

Do not run tests when only documentation is changed

2 participants