forked from Ecodev/newsletter
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.travis.yml
57 lines (50 loc) · 1.95 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
language: php
sudo: false
php:
- 5.5
- 5.6
env:
- TYPO3_BRANCH=TYPO3_6-2
- TYPO3_BRANCH=7.0.2
- TYPO3_BRANCH=7.1.0
- TYPO3_BRANCH=7.2.0
- TYPO3_BRANCH=7.3.1
- TYPO3_BRANCH=7.4.0
- TYPO3_BRANCH=7.5.0
- TYPO3_BRANCH=7.6.0
- TYPO3_BRANCH=master
matrix:
include:
- php: 5.3
env: TYPO3_BRANCH=TYPO3_6-2
- php: 5.4
env: TYPO3_BRANCH=TYPO3_6-2
allow_failures:
- env: TYPO3_BRANCH=master
fast_finish: true
cache:
directories:
- vendor
- $HOME/.composer/cache
before_script:
- if [[ $TRAVIS_PHP_VERSION = '5.6' && $TYPO3_BRANCH = '7.6.0' ]]; then PHPUNIT_FLAGS_UNIT="--coverage-clover=unit-tests-coverage.clover"; else PHPUNIT_FLAGS_UNIT=""; fi
- if [[ $TRAVIS_PHP_VERSION = '5.6' && $TYPO3_BRANCH = '7.6.0' ]]; then PHPUNIT_FLAGS_FUNCTIONAL="--coverage-clover=functional-tests-coverage.clover"; else PHPUNIT_FLAGS_FUNCTIONAL=""; fi
- npm install -g gulp
- npm install
- composer install
- cd ..
- git clone --branch $TYPO3_BRANCH --depth 1 https://github.com/TYPO3/TYPO3.CMS.git typo3_core
- mv typo3_core/* .
- composer install
- mkdir -p uploads typo3temp typo3conf/ext
- mv newsletter typo3conf/ext/
- export typo3DatabaseName="typo3";
- export typo3DatabaseHost="localhost";
- export typo3DatabaseUsername="root";
- export typo3DatabasePassword="";
script:
- cd typo3conf/ext/newsletter && gulp && cd ../../../
- ./bin/phpunit $PHPUNIT_FLAGS_UNIT --colors -c typo3conf/ext/newsletter/Tests/Build/UnitTests.xml
- ./bin/phpunit $PHPUNIT_FLAGS_FUNCTIONAL --colors -c typo3conf/ext/newsletter/Tests/Build/FunctionalTests.xml
after_script:
- if [[ ! -z $PHPUNIT_FLAGS_UNIT ]]; then echo "Uploading code coverage results" && cp -R typo3conf/ext/newsletter/.git . && wget https://scrutinizer-ci.com/ocular.phar && php ocular.phar code-coverage:upload --format=php-clover unit-tests-coverage.clover && php ocular.phar code-coverage:upload --format=php-clover functional-tests-coverage.clover ; fi