-
Notifications
You must be signed in to change notification settings - Fork 2
/
Makefile
44 lines (34 loc) · 1.09 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
# Default port to start server on
PORT := 8888
.PHONY: clean
clean:
rm -rf ./vendor
.PHONY: install
install:
composer install --prefer-dist
php db/database.php
.PHONY: start-server
start-server:
composer install --prefer-dist
php db/database.php
php -S localhost:$(PORT) -t public/ public/index.php
# linting based on https://github.com/dbfx/github-phplint
.PHONY: lint
lint:
# Make sure we don't lint test classes
composer install --prefer-dist --no-dev
# Lint for installed PHP version
sh -c "! (find . -type f -name \"*.php\" -not -path \"./build/*\" -not -path \"./vendor/*\" $1 -exec php -l -n {} \; | grep -v \"No syntax errors detected\")"
# Make devtools available again
composer install --prefer-dist
# Lint with CodeSniffer
vendor/bin/phpcs --standard=phpcs.xml src/ --ignore=src/Vendor
.PHONY: api_test
api_test:
newman run test/postman/scim-opf.postman_collection.json -e test/postman/scim-env.postman_environment.json
.PHONY: unit_test
unit_test:
composer install --prefer-dist
vendor/bin/phpunit -c test/phpunit.xml --testdox
.PHONY: fulltest
fulltest: lint api_test unit_test