This repository has been archived by the owner on Jun 11, 2019. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 26
/
Copy path.travis.yml
59 lines (50 loc) · 1.94 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
language: php
dist: trusty
addons:
apt:
packages:
- mysql-server-5.6
- mysql-client-core-5.6
- mysql-client-5.6
php:
- 5.6
- 7.0
- 7.1
- 7.2
env:
- TYPO3_VERSION=7.6.25
- TYPO3_VERSION=master
matrix:
fast_finish: true
allow_failures:
- env: TYPO3_VERSION=master
cache:
directories:
- vendor
- $HOME/.composer/cache
before_install:
- nvm install 8
- nvm use 8
- curl -o- -L https://yarnpkg.com/install.sh | bash
- export PATH=$HOME/.yarn/bin:$PATH
before_script:
- if [[ $TRAVIS_PHP_VERSION = '7.1' && $TYPO3_VERSION = '7.6.25' ]]; then PHPUNIT_FLAGS_UNIT="--coverage-clover=unit-tests-coverage.clover"; else PHPUNIT_FLAGS_UNIT=""; fi
- if [[ $TRAVIS_PHP_VERSION = '7.1' && $TYPO3_VERSION = '7.6.25' ]]; then PHPUNIT_FLAGS_FUNCTIONAL="--coverage-clover=functional-tests-coverage.clover"; else PHPUNIT_FLAGS_FUNCTIONAL=""; fi
- yarn install
- composer install
- cd ..
- git clone --branch $TYPO3_VERSION --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 && ./node_modules/.bin/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