Last active
January 28, 2021 18:35
-
-
Save wijourdil/923d68638d0c3a719b94a683a72d5cad to your computer and use it in GitHub Desktop.
Makefile
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!Make | |
include .env | |
export $(shell sed 's/=.*//' .env) | |
# Install database | |
install_db: | |
echo 'CREATE DATABASE IF NOT EXISTS `$(DB_DATABASE)`' | mysql -u$(DB_USERNAME) -p$(DB_PASSWORD) -h$(DB_HOST) | |
make fresh | |
# Refresh and seed database | |
fresh: | |
php artisan migrate:fresh --seed | |
# Run security checker | |
secucheck: | |
./vendor/bin/security-checker security:check | |
# Run phpunit without coverage | |
phpunit: | |
./vendor/bin/phpunit --no-coverage | |
# Run phpunit with coverage | |
coverage: | |
./vendor/bin/phpunit --coverage-html .code_coverage | |
# Run phpstan | |
stan: | |
./vendor/bin/phpstan analyse --memory-limit=2G | |
# Run phpcs | |
phpcs: | |
./vendor/bin/phpcs --report=full | |
# Run the whole test suite (security checker + phpcs + phpstan + phpunit without coverage) | |
testing: | |
make secucheck | |
make phpcs | |
make stan | |
make phpunit |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment