mirror of
https://github.com/archtechx/livewire-access.git
synced 2025-12-12 04:14:03 +00:00
Initial commit
This commit is contained in:
commit
a29235253b
13 changed files with 487 additions and 0 deletions
63
check
Executable file
63
check
Executable file
|
|
@ -0,0 +1,63 @@
|
|||
#!/bin/bash
|
||||
set -e
|
||||
|
||||
offer_run() {
|
||||
read -p "For more output, run $1. Run it now (Y/n)? " run
|
||||
|
||||
case ${run:0:1} in
|
||||
n|N )
|
||||
exit 1
|
||||
;;
|
||||
* )
|
||||
$1
|
||||
;;
|
||||
esac
|
||||
|
||||
exit 1
|
||||
}
|
||||
|
||||
if (php-cs-fixer fix --dry-run --config=.php_cs.php > /dev/null 2>/dev/null); then
|
||||
echo '✅ php-cs-fixer OK'
|
||||
else
|
||||
read -p "⚠️ php-cs-fixer found issues. Fix (Y/n)? " fix
|
||||
case ${fix:0:1} in
|
||||
n|N )
|
||||
echo '❌ php-cs-fixer FAIL'
|
||||
offer_run 'php-cs-fixer fix --config=.php_cs.php'
|
||||
;;
|
||||
* )
|
||||
if (php-cs-fixer fix --config=.php_cs.php > /dev/null 2>/dev/null); then
|
||||
echo '✅ php-cs-fixer OK'
|
||||
else
|
||||
echo '❌ php-cs-fixer FAIL'
|
||||
offer_run 'php-cs-fixer fix --config=.php_cs.php'
|
||||
fi
|
||||
;;
|
||||
esac
|
||||
fi
|
||||
|
||||
if (./vendor/bin/psalm > /dev/null 2>/dev/null); then
|
||||
echo '✅ Psalm OK'
|
||||
else
|
||||
echo '❌ Psalm FAIL'
|
||||
offer_run './vendor/bin/psalm'
|
||||
fi
|
||||
|
||||
if (./vendor/bin/phpstan analyse > /dev/null 2>/dev/null); then
|
||||
echo '✅ PHPStan OK'
|
||||
else
|
||||
echo '❌ PHPStan FAIL'
|
||||
offer_run './vendor/bin/phpstan analyse'
|
||||
fi
|
||||
|
||||
(MYSQL_PORT=3307 docker-compose up -d > /dev/null 2>/dev/null) || true
|
||||
|
||||
if (./vendor/bin/phpunit > /dev/null 2>/dev/null); then
|
||||
echo '✅ PHPUnit OK'
|
||||
else
|
||||
echo '❌ PHPUnit FAIL'
|
||||
offer_run './vendor/bin/phpunit'
|
||||
fi
|
||||
|
||||
echo '=================='
|
||||
echo '✅ Everything OK'
|
||||
Loading…
Add table
Add a link
Reference in a new issue