Skip to content

Include root directory files in code coverage report#2918

Closed
carterbuce wants to merge 3 commits intofacebook:mainfrom
carterbuce:index-directory-code-coverage
Closed

Include root directory files in code coverage report#2918
carterbuce wants to merge 3 commits intofacebook:mainfrom
carterbuce:index-directory-code-coverage

Conversation

@carterbuce
Copy link
Copy Markdown
Contributor

@carterbuce carterbuce commented Mar 4, 2025

Changes proposed in this Pull Request:

Our code coverage report currently only runs for files in the includes directory. We do have tests, however, for some of the files in the root directory and should be tracking the coverage for those as well.

  • Do the changed files pass phpcs checks? Please remove phpcs:ignore comments in changed files and fix any issues, or delete if not practical.

Screenshots:

image

Detailed test instructions:

vendor/bin/phpunit --coverage-html=reports/coverage

Changelog entry

Including root directory php files in phpunit code coverage report

@facebook-github-bot
Copy link
Copy Markdown
Contributor

@carterbuce has imported this pull request. If you are a Meta employee, you can view this diff on Phabricator.

@facebook-github-bot
Copy link
Copy Markdown
Contributor

@carterbuce has updated the pull request. You must reimport the pull request before landing.

@carterbuce carterbuce force-pushed the index-directory-code-coverage branch from 3222a28 to 002c771 Compare March 6, 2025 01:05
@facebook-github-bot
Copy link
Copy Markdown
Contributor

@carterbuce has updated the pull request. You must reimport the pull request before landing.

@carterbuce
Copy link
Copy Markdown
Contributor Author

carterbuce commented Mar 6, 2025

@vahidkay-meta, any ideas why the code sniff and unit test workflows are stuck in pending here? I don't see any workflows started for this PR, even after re-pushing it. I'm guessing shipit would break unless these are in a completed state

edit: I think this is happening because the only file changed here is phpunit.xml.dist, which does not match the "*.php" path filters defined within the workflow yml files. Is there a way to safely bypass the checks to get this landed?

@facebook-github-bot
Copy link
Copy Markdown
Contributor

@carterbuce has imported this pull request. If you are a Meta employee, you can view this diff on Phabricator.

facebook-github-bot pushed a commit that referenced this pull request Mar 11, 2025
Summary:
In PRs that don't modify any php files, the "Code sniff" and "PHP Unit Tests" checks get stuck in a pending state (ex. #2918). They do not run because the PR doesn't match any of the filters that the workflows define. This causes issues because our repository is set up to require all checks to pass before merging.

This PR updates the filtering on these workflows to run on every PR, regardless of what files were changed.

Pull Request resolved: #2926

Reviewed By: nrostrow-meta

Differential Revision: D70673188

Pulled By: carterbuce

fbshipit-source-id: e2fc616d497e21b9b4f993da365afcc4a0664b4f
@facebook-github-bot
Copy link
Copy Markdown
Contributor

@carterbuce has updated the pull request. You must reimport the pull request before landing.

@facebook-github-bot
Copy link
Copy Markdown
Contributor

@carterbuce has imported this pull request. If you are a Meta employee, you can view this diff on Phabricator.

@facebook-github-bot
Copy link
Copy Markdown
Contributor

@carterbuce merged this pull request in d5db014.

tzahgr pushed a commit that referenced this pull request Mar 17, 2025
Summary:
In PRs that don't modify any php files, the "Code sniff" and "PHP Unit Tests" checks get stuck in a pending state (ex. #2918). They do not run because the PR doesn't match any of the filters that the workflows define. This causes issues because our repository is set up to require all checks to pass before merging.

This PR updates the filtering on these workflows to run on every PR, regardless of what files were changed.

Pull Request resolved: #2926

Reviewed By: nrostrow-meta

Differential Revision: D70673188

Pulled By: carterbuce

fbshipit-source-id: e2fc616d497e21b9b4f993da365afcc4a0664b4f
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants