mirror of
https://github.com/Codappix/search_core.git
synced 2024-11-24 20:36:11 +01:00
FEATURE: Add code coverage for tests to travis and scrutinizer (#6)
* FEATURE: Add code coverage for tests to travis and scrutinizer * To detect which parts still need to be tested * BUGFIX: Fix broken TYPO3 installation for tests * We need the source, otherwise a base test file will be missing
This commit is contained in:
parent
67463fa135
commit
070e901dbb
5 changed files with 38 additions and 4 deletions
|
@ -32,3 +32,7 @@ tools:
|
|||
|
||||
php_analyzer:
|
||||
enabled: true
|
||||
# We generate code coverage during tests at travis and will send them here
|
||||
external_code_coverage:
|
||||
runs: 2
|
||||
timeout: 1200
|
||||
|
|
|
@ -45,6 +45,12 @@ install: make install
|
|||
|
||||
script: make Tests
|
||||
|
||||
after_script:
|
||||
- wget https://scrutinizer-ci.com/ocular.phar
|
||||
- php ocular.phar code-coverage:upload --format=php-clover .Build/report/unit/clover/coverage
|
||||
- php ocular.phar code-coverage:upload --format=php-clover .Build/report/functional/clover/coverage
|
||||
- make clean
|
||||
|
||||
cache:
|
||||
directories:
|
||||
- $HOME/.composer/cache
|
||||
|
|
8
Makefile
8
Makefile
|
@ -10,12 +10,9 @@ typo3DatabasePassword ?= "dev"
|
|||
typo3DatabaseHost ?= "127.0.0.1"
|
||||
|
||||
.PHONY: install
|
||||
install:
|
||||
rm -rf .Build
|
||||
install: clean
|
||||
COMPOSER_PROCESS_TIMEOUT=1000 composer require -vv --dev --prefer-source typo3/cms="$(TYPO3_VERSION)"
|
||||
|
||||
git checkout composer.json
|
||||
mkdir -p $(TYPO3_WEB_DIR)/uploads $(TYPO3_WEB_DIR)/typo3temp
|
||||
|
||||
unitTests:
|
||||
TYPO3_PATH_WEB=$(TYPO3_WEB_DIR) \
|
||||
|
@ -33,3 +30,6 @@ functionalTests:
|
|||
|
||||
.PHONY: Tests
|
||||
Tests: unitTests functionalTests
|
||||
|
||||
clean:
|
||||
rm -rf .Build composer.lock
|
||||
|
|
|
@ -19,4 +19,16 @@
|
|||
<directory>.</directory>
|
||||
</testsuite>
|
||||
</testsuites>
|
||||
|
||||
<filter>
|
||||
<whitelist>
|
||||
<directory suffix=".php">../../Classes</directory>
|
||||
</whitelist>
|
||||
</filter>
|
||||
|
||||
<logging>
|
||||
<log type="coverage-html" target="../../.Build/report/unit/html" lowUpperBound="35" highLowerBound="70"/>
|
||||
<log type="coverage-clover" target="../../.Build/report/unit/clover/coverage"/>
|
||||
<log type="coverage-text" target="php://stdout" showUncoveredFiles="false"/>
|
||||
</logging>
|
||||
</phpunit>
|
||||
|
|
|
@ -19,4 +19,16 @@
|
|||
<directory>.</directory>
|
||||
</testsuite>
|
||||
</testsuites>
|
||||
|
||||
<filter>
|
||||
<whitelist>
|
||||
<directory suffix=".php">../../Classes</directory>
|
||||
</whitelist>
|
||||
</filter>
|
||||
|
||||
<logging>
|
||||
<log type="coverage-html" target="../../.Build/report/functional/html" lowUpperBound="35" highLowerBound="70"/>
|
||||
<log type="coverage-clover" target="../../.Build/report/functional/clover/coverage"/>
|
||||
<log type="coverage-text" target="php://stdout" showUncoveredFiles="false"/>
|
||||
</logging>
|
||||
</phpunit>
|
||||
|
|
Loading…
Reference in a new issue