-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
71 lines (55 loc) · 1.63 KB
/
Makefile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
include .env
.env:
cp .env.example .env
vendor: composer.lock .env
composer install
node_modules: package-lock.json .env
npm ci
.PHONY: install
install: vendor node_modules
.PHONY: update
update:
npm update
composer update
.PHONY: db
create-db: .env
sudo -u postgres psql -c 'DROP DATABASE IF EXISTS "${DB_DATABASE}"'
sudo -u postgres createdb --owner ${DB_USERNAME} ${DB_DATABASE}
.PHONY: build
build: node_modules
npm run build
.PHONY: reset
reset: vendor
php artisan db:wipe
php artisan migrate --seed
.PHONY: migrate
migrate: vendor
php artisan migrate --seed
.PHONY: test
test: vendor
php artisan test --parallel --log-junit "reports/phpunit.xml" --no-coverage
.PHONY: coverage
coverage: vendor
XDEBUG_MODE=coverage php artisan test --parallel --log-junit "reports/phpunit.xml" --coverage-clover "reports/coverage.xml" --coverage-html "reports/coverage"
open reports/coverage/index.html &> /dev/null &
.PHONY: lint
lint: vendor node_modules
npm run lint
php vendor/bin/pint --test --config=pint.json
php vendor/bin/phpstan --configuration=phpstan.neon
php vendor/bin/phpmd app ansi phpmd.xml
.PHONY: fix
fix: vendor node_modules
npm run fix
php vendor/bin/pint --config=pint.json
.PHONY: metrics
metrics: vendor
php vendor/bin/phpunit --log-junit "reports/phpunit.xml" --no-coverage
php vendor/bin/phpmetrics --config=phpmetrics.json --junit=reports/phpunit.xml
open reports/phpmetrics/index.html &> /dev/null &
.PHONY: phpstan
phpstan: vendor
php vendor/bin/phpstan --configuration=phpstan.neon
.PHONY: baseline
baseline: vendor
php vendor/bin/phpstan --configuration=phpstan.neon --generate-baseline=phpstan-baseline.neon