Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added coverage commands for Herd users #15468

Merged
merged 1 commit into from
Sep 9, 2024
Merged

Conversation

marcusmoore
Copy link
Collaborator

Description

This PR adds composer commands so Herd users can easily generate code coverage reports in clover or html format:

coverage:herd:clover
coverage:herd:html

Here is what they are aliases for:

herd coverage vendor/bin/phpunit --coverage-clover tests/coverage/clover.xml
herd coverage vendor/bin/phpunit --coverage-html tests/coverage/html

The reports are dumped to the tests/coverage/ directory after generating.

The html format is human-readable and the clover format can be imported to PHPStorm (and other IDEs) for direct referencing in the IDE.


This is really just so I don't have to remember the longer commands that are aliased and I won't be mad if this isn't accepted (I can throw them into my bash aliases)...

Type of change

  • Chore

@probot-autolabeler probot-autolabeler bot added backend dependencies Pull requests that update a dependency file labels Sep 9, 2024
Copy link

what-the-diff bot commented Sep 9, 2024

PR Summary

  • Update to .gitignore File
    A new entry has been added to the .gitignore file. This means that certain test results will now be ignored by the Git version control system, specifically files under the tests/coverage/ directory. This helps keep our repository clean and free from clutter that doesn't necessarily need to be tracked.

  • New Scripts Added to composer.json File
    Two new scripts coverage:herd:clover and coverage:herd:html have been added to the composer.json file. These scripts will provide new ways for us to check our code coverage. In other words, these tools will help us measure how much of our code is being tested, which is crucial in maintaining high code quality and identifying untested parts of our codebase.

@snipe snipe merged commit 549dec9 into snipe:develop Sep 9, 2024
8 of 9 checks passed
@snipe
Copy link
Owner

snipe commented Sep 9, 2024

Love it!

@marcusmoore marcusmoore deleted the coverage branch September 9, 2024 19:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backend dependencies Pull requests that update a dependency file
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants