Skip to content

ci: support conditional required checks with path filtering#576

Merged
JasonXuDeveloper merged 1 commit into
masterfrom
ci/conditional-required-checks
Jan 25, 2026
Merged

ci: support conditional required checks with path filtering#576
JasonXuDeveloper merged 1 commit into
masterfrom
ci/conditional-required-checks

Conversation

@JasonXuDeveloper
Copy link
Copy Markdown
Owner

Summary

  • Fix "Waiting for status to be reported" issue when PR doesn't match path filters
  • Use dorny/paths-filter@v3 to detect file changes at job level instead of workflow level
  • Skip jobs report success with matching names so GitHub Ruleset correctly identifies check status

Problem

GitHub Ruleset requires Run Unity Tests and Analyze C# Code checks to pass before merge. However, these workflows have path filters that prevent them from running when only documentation files change. This causes PRs to show "Waiting for status to be reported" indefinitely.

Solution

Move path filtering from workflow level to job level:

  1. Detect Changes Job: Uses dorny/paths-filter to check if relevant files changed
  2. Actual Job: Runs only when changes are detected
  3. Skip Job: Runs when no changes detected, uses same name as actual job

Since both jobs share the same name, GitHub sees them as the same check and the Ruleset requirement is satisfied.

Changes

File Changes
pr-tests.yml Add changes job, skip-tests job with same name as run-tests
codeql.yml Add changes job, skip-analyze job with same name as analyze; schedule/dispatch always run

Test Plan

  • Create PR with only documentation changes → skip-* jobs run, checks pass immediately
  • Create PR with code changes → actual test/analysis jobs run as before
  • Scheduled CodeQL analysis continues to run weekly

🤖 Generated with Claude Code

Use dorny/paths-filter to detect file changes at job level instead of
workflow level. This ensures workflows always run and report a status
to GitHub, solving the "Waiting for status" issue when path filters
don't match.

Changes:
- pr-tests.yml: Add changes detection job, skip-tests job reports
  success when no relevant files changed
- codeql.yml: Add changes detection job, skip-analyze job reports
  success when no relevant files changed, schedule/dispatch always run

Both skip jobs use the same name as their actual counterparts so GitHub
Ruleset correctly identifies the check status.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Signed-off-by: JasonXuDeveloper - 傑 <jason@xgamedev.net>
@JasonXuDeveloper JasonXuDeveloper enabled auto-merge (squash) January 25, 2026 22:40
@claude
Copy link
Copy Markdown

claude Bot commented Jan 25, 2026

Code review

No issues found. Checked for bugs and CLAUDE.md compliance.

@JasonXuDeveloper JasonXuDeveloper merged commit 0a614ce into master Jan 25, 2026
14 checks passed
@JasonXuDeveloper JasonXuDeveloper deleted the ci/conditional-required-checks branch January 25, 2026 22:42
@github-actions
Copy link
Copy Markdown

Unity Test Results

EditMode: All tests passed
PlayMode: All tests passed

Unity Version: 2022.3.55f1
Project Path: UnityProject

✅ All tests passed! The PR is ready for review.

View workflow run

Click here to view the full workflow run

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