Skip to content

Instantly share code, notes, and snippets.

@wijourdil
Last active January 28, 2021 18:35
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save wijourdil/923d68638d0c3a719b94a683a72d5cad to your computer and use it in GitHub Desktop.
Save wijourdil/923d68638d0c3a719b94a683a72d5cad to your computer and use it in GitHub Desktop.
Makefile
#!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