2016-12-09 13:01:09 +01:00
|
|
|
mkfile_path := $(abspath $(lastword $(MAKEFILE_LIST)))
|
|
|
|
current_dir := $(dir $(mkfile_path))
|
|
|
|
|
2017-07-04 10:12:47 +02:00
|
|
|
TYPO3_WEB_DIR := $(current_dir).Build/web
|
|
|
|
TYPO3_PATH_ROOT := $(current_dir).Build/web
|
2016-12-09 13:01:09 +01:00
|
|
|
# Allow different versions on travis
|
2017-07-07 12:03:06 +02:00
|
|
|
TYPO3_VERSION ?= ~8.7
|
2018-03-13 17:28:50 +01:00
|
|
|
typo3DatabaseName ?= "searchcore_test"
|
2016-12-09 19:45:46 +01:00
|
|
|
typo3DatabaseUsername ?= "dev"
|
|
|
|
typo3DatabasePassword ?= "dev"
|
|
|
|
typo3DatabaseHost ?= "127.0.0.1"
|
2016-12-09 13:01:09 +01:00
|
|
|
|
2018-03-13 11:28:40 +01:00
|
|
|
sourceOrDist=--prefer-dist
|
|
|
|
ifeq ($(TYPO3_VERSION),~7.6)
|
|
|
|
sourceOrDist=--prefer-source
|
|
|
|
endif
|
|
|
|
|
2016-12-09 13:01:09 +01:00
|
|
|
.PHONY: install
|
2016-12-10 14:59:48 +01:00
|
|
|
install: clean
|
2018-03-13 11:28:40 +01:00
|
|
|
if [ $(TYPO3_VERSION) = ~7.6 ]; then \
|
|
|
|
patch composer.json Tests/InstallPatches/composer.json.patch; \
|
|
|
|
fi
|
|
|
|
|
|
|
|
COMPOSER_PROCESS_TIMEOUT=1000 composer require -vv --dev $(sourceOrDist) typo3/cms="$(TYPO3_VERSION)"
|
2016-12-09 13:01:09 +01:00
|
|
|
git checkout composer.json
|
|
|
|
|
2017-11-11 16:46:03 +01:00
|
|
|
cgl:
|
|
|
|
./.Build/bin/phpcs
|
|
|
|
|
2016-12-09 19:45:46 +01:00
|
|
|
functionalTests:
|
|
|
|
typo3DatabaseName=$(typo3DatabaseName) \
|
|
|
|
typo3DatabaseUsername=$(typo3DatabaseUsername) \
|
|
|
|
typo3DatabasePassword=$(typo3DatabasePassword) \
|
|
|
|
typo3DatabaseHost=$(typo3DatabaseHost) \
|
|
|
|
TYPO3_PATH_WEB=$(TYPO3_WEB_DIR) \
|
|
|
|
.Build/bin/phpunit --colors --debug -v \
|
|
|
|
-c Tests/Functional/FunctionalTests.xml
|
|
|
|
|
2017-06-06 13:53:08 +02:00
|
|
|
unitTests:
|
|
|
|
TYPO3_PATH_WEB=$(TYPO3_WEB_DIR) \
|
|
|
|
.Build/bin/phpunit --colors --debug -v \
|
|
|
|
-c Tests/Unit/UnitTests.xml
|
|
|
|
|
2018-03-20 11:02:43 +01:00
|
|
|
uploadCodeCoverage: uploadCodeCoverageToScrutinizer
|
2016-12-12 22:47:45 +01:00
|
|
|
|
|
|
|
uploadCodeCoverageToScrutinizer:
|
|
|
|
wget https://scrutinizer-ci.com/ocular.phar && \
|
|
|
|
php ocular.phar code-coverage:upload --format=php-clover .Build/report/functional/clover/coverage
|
|
|
|
|
2016-12-10 14:59:48 +01:00
|
|
|
clean:
|
|
|
|
rm -rf .Build composer.lock
|