forked from T3Voila/templavoilaplus
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.travis.yml
70 lines (63 loc) · 2.19 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
62
63
64
65
66
67
68
69
70
language: php
php:
- 5.5
- 5.6
- 7
- hhvm-nightly
env:
- TYPO3_VERSION="6.2" UNIT_TESTS=yes FUNCTIONAL_TESTS=yes PHP_LINT=yes
- TYPO3_VERSION="7.0" UNIT_TESTS=yes FUNCTIONAL_TESTS=yes PHP_LINT=yes
- TYPO3_VERSION="7.1" UNIT_TESTS=yes FUNCTIONAL_TESTS=yes PHP_LINT=yes
matrix:
allow_failures:
- php: 7
- php: hhvm-nightly
notifications:
slack:
rooms:
secure: rnQbOa1Nh0F75DfAYjdW/09a5xuwW9qNU6ifOywtnscJ+4OREQpFyu6ArCspCtkHdaX/BDdrx083m62kQZmzm8FLfzXu+EXq4dvzHagQ8D6a/Zbl8iNPB3X7UXxVdKTwWjWaraeK3o9CjO1j1BfuGz97ewzQWP/71EP1u5LRyUI=
on_success: always
on_failure: always
install:
- sudo apt-get install parallel
before_script:
- cd ..
- cp templavoila/Tests/Build/composer.json .
- mkdir -p uploads typo3temp typo3conf/ext typo3_src
- wget -O - "http://get.typo3.org/$TYPO3_VERSION" | tar -xzf - -C typo3_src --strip-components=1
- ln -s typo3_src/index.php .
- ln -s typo3_src/typo3 .
- wget https://raw.github.com/oliversalzburg/typo3scripts/master/extExtract.php
- chmod 777 extExtract.php
- php ./extExtract.php --extension=static_info_tables --force-version=6.2.1 --output-dir=typo3conf/ext/static_info_tables
- composer self-update
- composer update
- mv templavoila typo3conf/ext/templavoila
script:
- >
if [[ "$UNIT_TESTS" == "yes" ]]; then
echo;
echo "Running unit tests";
./bin/phpunit --colors -c typo3/sysext/core/Build/UnitTests.xml ./typo3conf/ext/templavoila/Tests/Unit
fi
- >
if [[ "$FUNCTIONAL_TESTS" == "yes" ]]; then
echo;
echo "Running functional tests";
export typo3DatabaseName="typo3";
export typo3DatabaseHost="localhost";
export typo3DatabaseUsername="root";
export typo3DatabasePassword="";
./bin/phpunit --colors -c typo3/sysext/core/Build/FunctionalTests.xml ./typo3conf/ext/templavoila/Tests/Functional/ApiTest.php
fi
- >
if [[ "$PHP_LINT" == "yes" ]]; then
echo;
echo "Running php lint";
/bin/bash -c "
if ! find typo3conf/ext/templavoila -name \*.php | parallel --gnu 'php -l {}' > /tmp/errors 2>&1; then
grep -v \"No syntax errors detected in\" /tmp/errors;
exit 99;
fi
"
fi