forked from graze/telnet-client
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
40 lines (29 loc) · 1.19 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
.PHONY: test test-coverage test-coverage-html test-coverage-clover test-unit test-unit-coverage test-unit-coverage-html test-unit-coverage-clover install
# Setting up
build: ## Install dependencies and set up example conf file
@docker-compose run --rm composer install
# Testing
test: ## Run all tests
test: test-unit
# Coverage tests
test-coverage: ## Run coverage tests
@docker-compose run --rm php ./vendor/bin/phpunit --coverage-text
test-coverage-html:
@docker-compose run --rm php ./vendor/bin/phpunit --coverage-html ./tests/report/html
test-coverage-clover:
@docker-compose run --rm php ./vendor/bin/phpunit --coverage-clover=./tests/report/coverage.clover
# Unit tests
test-unit: ## Run unit tests
@docker-compose run --rm php ./vendor/bin/phpunit --testsuite unit
# Code sniffer
lint: ## Run phpcs against the code.
@docker-compose run --rm php vendor/bin/phpcs -p --warning-severity=0 src/ tests/
lint-fix: ## Run phpcbf against the code.
@docker-compose run --rm php vendor/bin/phpcbf -p src/
.SILENT: help
help: ## Show this help message
set -x
echo "Usage: make [target] ..."
echo ""
echo "Available targets:"
egrep '^(.+)\:\ ##\ (.+)' ${MAKEFILE_LIST} | column -t -c 2 -s ':#'