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-04 10:12:47 +02:00
|
|
|
TYPO3_VERSION ?= ~8.2
|
|
|
|
typo3DatabaseName ?= "searchcore_test2"
|
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
|
|
|
|
|
|
|
.PHONY: install
|
2016-12-10 14:59:48 +01:00
|
|
|
install: clean
|
2017-05-11 09:51:14 +02:00
|
|
|
COMPOSER_PROCESS_TIMEOUT=1000 composer require -vv --dev --prefer-source --ignore-platform-reqs typo3/cms="$(TYPO3_VERSION)"
|
2016-12-09 13:01:09 +01:00
|
|
|
git checkout composer.json
|
|
|
|
|
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 \
|
2017-07-04 10:12:47 +02:00
|
|
|
--stop-on-error \
|
2016-12-09 19:45:46 +01:00
|
|
|
-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
|
|
|
|
|
2016-12-12 22:47:45 +01:00
|
|
|
uploadCodeCoverage: uploadCodeCoverageToScrutinizer uploadCodeCoverageToCodacy
|
|
|
|
|
|
|
|
uploadCodeCoverageToScrutinizer:
|
|
|
|
wget https://scrutinizer-ci.com/ocular.phar && \
|
|
|
|
php ocular.phar code-coverage:upload --format=php-clover .Build/report/functional/clover/coverage
|
|
|
|
|
|
|
|
uploadCodeCoverageToCodacy:
|
|
|
|
composer require -vv --dev codacy/coverage && \
|
|
|
|
git checkout composer.json && \
|
|
|
|
php .Build/bin/codacycoverage clover .Build/report/functional/clover/coverage
|
|
|
|
|
2016-12-10 14:59:48 +01:00
|
|
|
clean:
|
|
|
|
rm -rf .Build composer.lock
|