2016-12-09 13:01:09 +01:00
|
|
|
mkfile_path := $(abspath $(lastword $(MAKEFILE_LIST)))
|
|
|
|
current_dir := $(dir $(mkfile_path))
|
|
|
|
|
|
|
|
TYPO3_WEB_DIR := $(current_dir).Build/Web
|
|
|
|
# Allow different versions on travis
|
2017-05-11 13:49:35 +02:00
|
|
|
TYPO3_VERSION ?= ~7.6
|
2016-12-22 09:45:43 +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
|
|
|
|
|
|
|
.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 \
|
|
|
|
-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
|