feature - 8 - Add code coverage
This commit is contained in:
parent
b93e6cb832
commit
2ed9dfbdaa
4 changed files with 29 additions and 0 deletions
1
.gitignore
vendored
1
.gitignore
vendored
|
|
@ -1,5 +1,6 @@
|
||||||
/composer.lock
|
/composer.lock
|
||||||
/.phpunit.cache
|
/.phpunit.cache
|
||||||
|
/coverage
|
||||||
/node_modules
|
/node_modules
|
||||||
/public/build
|
/public/build
|
||||||
/public/hot
|
/public/hot
|
||||||
|
|
|
||||||
|
|
@ -72,6 +72,10 @@ # Database
|
||||||
make seed # Seed database
|
make seed # Seed database
|
||||||
make fresh # Fresh migrate with seeds
|
make fresh # Fresh migrate with seeds
|
||||||
|
|
||||||
|
# Testing
|
||||||
|
make test # Run tests
|
||||||
|
composer test:coverage-html # Run tests with coverage report (generates coverage/index.html)
|
||||||
|
|
||||||
# Utilities
|
# Utilities
|
||||||
make shell # Enter app container
|
make shell # Enter app container
|
||||||
make db-shell # Enter database shell
|
make db-shell # Enter database shell
|
||||||
|
|
|
||||||
|
|
@ -57,6 +57,17 @@
|
||||||
"dev": [
|
"dev": [
|
||||||
"Composer\\Config::disableProcessTimeout",
|
"Composer\\Config::disableProcessTimeout",
|
||||||
"npx concurrently -c \"#93c5fd,#c4b5fd,#fb7185,#fdba74\" \"php artisan serve\" \"php artisan queue:listen --tries=1\" \"php artisan pail --timeout=0\" \"npm run dev\" --names=server,queue,logs,vite"
|
"npx concurrently -c \"#93c5fd,#c4b5fd,#fb7185,#fdba74\" \"php artisan serve\" \"php artisan queue:listen --tries=1\" \"php artisan pail --timeout=0\" \"npm run dev\" --names=server,queue,logs,vite"
|
||||||
|
],
|
||||||
|
"test": [
|
||||||
|
"@php artisan test"
|
||||||
|
],
|
||||||
|
"test:coverage": [
|
||||||
|
"Composer\\Config::disableProcessTimeout",
|
||||||
|
"@php -d xdebug.mode=coverage artisan test --coverage"
|
||||||
|
],
|
||||||
|
"test:coverage-html": [
|
||||||
|
"Composer\\Config::disableProcessTimeout",
|
||||||
|
"@php -d xdebug.mode=coverage vendor/bin/phpunit --coverage-html coverage --coverage-text"
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
"extra": {
|
"extra": {
|
||||||
|
|
|
||||||
13
phpunit.xml
13
phpunit.xml
|
|
@ -15,8 +15,21 @@
|
||||||
<source>
|
<source>
|
||||||
<include>
|
<include>
|
||||||
<directory>app</directory>
|
<directory>app</directory>
|
||||||
|
<directory>src</directory>
|
||||||
</include>
|
</include>
|
||||||
|
<exclude>
|
||||||
|
<directory>app/Console</directory>
|
||||||
|
<directory>app/Exceptions</directory>
|
||||||
|
<directory>app/Providers</directory>
|
||||||
|
</exclude>
|
||||||
</source>
|
</source>
|
||||||
|
<coverage>
|
||||||
|
<report>
|
||||||
|
<html outputDirectory="coverage"/>
|
||||||
|
<text outputFile="coverage/coverage.txt" showOnlySummary="true"/>
|
||||||
|
<clover outputFile="coverage/clover.xml"/>
|
||||||
|
</report>
|
||||||
|
</coverage>
|
||||||
<php>
|
<php>
|
||||||
<env name="APP_ENV" value="testing"/>
|
<env name="APP_ENV" value="testing"/>
|
||||||
<env name="APP_MAINTENANCE_DRIVER" value="file"/>
|
<env name="APP_MAINTENANCE_DRIVER" value="file"/>
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue