forked from georgringer/news
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.travis.yml
61 lines (55 loc) · 1.87 KB
/
.travis.yml
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
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
language: php
php:
- 5.3
- 5.4
- 5.5
- 5.6
env:
- DB=mysql TYPO3_BRANCH=master COVERAGE=0
matrix:
include:
- php: 5.5
env: DB=mysql TYPO3_BRANCH=master COVERAGE=1
notifications:
email:
# - georg.ringer@gmail.com
before_script:
- cd ..
- git clone --single-branch --branch $TYPO3_BRANCH --depth 1 https://github.com/TYPO3/TYPO3.CMS.git typo3_core
- mv typo3_core/* .
- sudo apt-get install parallel
- composer self-update
- composer install
- mkdir -p uploads typo3temp typo3conf/ext
- mv news typo3conf/ext/
script:
- >
if [[ "$COVERAGE" == "0" ]]; then
echo;
echo "Running unit tests";
./bin/phpunit --colors -c typo3conf/ext/news/Tests/Build/UnitTests.xml
fi
- >
if [[ "$COVERAGE" == "1" ]]; then
echo;
echo "Running unit tests";
./bin/phpunit --coverage-clover=unittest-coverage.clover --colors -c typo3conf/ext/news/Tests/Build/UnitTests.xml
fi
- >
if [[ "$COVERAGE" == "1" ]]; then
echo;
export typo3DatabaseName="typo3";
export typo3DatabaseHost="localhost";
export typo3DatabaseUsername="root";
export typo3DatabasePassword="";
find . -wholename '*/typo3conf/ext/news/Tests/Functional/*Test.php' | parallel --gnu 'echo; echo "Running functional test suite {}"; ./bin/phpunit --coverage-clover={}functionaltest-coverage.clover --colors -c typo3conf/ext/news/Tests/Build/FunctionalTests.xml {}'
fi
- >
if [[ "$COVERAGE" == "1" ]]; then
echo;
echo "Uploading code coverage results";
wget https://scrutinizer-ci.com/ocular.phar
cp -R typo3conf/ext/news/.git .
php ocular.phar code-coverage:upload --format=php-clover unittest-coverage.clover
find . -wholename '*/typo3conf/ext/news/Tests/Functional/*Test.php' -exec php ocular.phar code-coverage:upload --format=php-clover {}functionaltest-coverage.clover \;
fi