-
Notifications
You must be signed in to change notification settings - Fork 16
/
.travis.yml
76 lines (71 loc) · 2 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
71
72
73
74
75
76
language: php
php:
- 5.3
- 5.4
- 5.5
- 5.6
- hhvm
cache:
apt: true
env:
global:
- EXTENSIONKEY=piwikintegration
matrix:
- TYPO3_BRANCH=master COVERAGE=0
- TYPO3_BRANCH=TYPO3_6-2 COVERAGE=0
before_script:
- sudo apt-get install parallel
- npm install csslint
- npm -g install jshint
- composer self-update
- cd ..
- git clone --single-branch --branch $TYPO3_BRANCH --depth 1 https://github.com/TYPO3/TYPO3.CMS.git typo3_core
- mv typo3_core/* .
- composer require --no-update "typo3-ci/typo3cms:dev-master" "typo3-ci/typo3sniffpool:dev-master"
- composer install
- mkdir -p uploads typo3temp typo3conf/ext
- mv $EXTENSIONKEY typo3conf/ext/
script:
- >
echo;
echo "Running php lint";
/bin/bash -c "
if ! find typo3conf/ext/$EXTENSIONKEY -name \*.php | parallel --gnu 'php -l {}' > /tmp/errors 2>&1; then
grep -v \"No syntax errors detected in\" /tmp/errors;
exit 99;
fi
"
- >
./bin/phpcs --standard=TYPO3CMS -n typo3conf/ext/$EXTENSIONKEY/Classes/
- >
echo;
echo "Running css lint";
/bin/bash -c "
if [ -d typo3conf/ext/$EXTENSIONKEY/Resources/Public/Css/ ]; then
csslint typo3conf/ext/$EXTENSIONKEY/Resources/Public/Css/
fi
"
- >
echo;
echo "Running jshint";
/bin/bash -c "
if [ -d typo3conf/ext/$EXTENSIONKEY/Resources/Public/JavaScript/ ]; then
jshint typo3conf/ext/$EXTENSIONKEY/Resources/Public/JavaScript/
fi
"
- >
echo;
echo "Running unit tests";
/bin/bash -c "
if [ -d typo3conf/ext/$EXTENSIONKEY/Tests/Unit/ ]; then
./bin/phpunit --colors -c typo3/sysext/core/Build/UnitTests.xml typo3conf/ext/$EXTENSIONKEY/Tests/Unit/
fi
"
- >
echo;
echo "Running functional tests";
/bin/bash -c "
if [ -d typo3conf/ext/$EXTENSIONKEY/Tests/Functional/ ]; then
./bin/phpunit --colors -c typo3/sysext/core/Build/FunctionalTests.xml typo3conf/ext/$EXTENSIONKEY/Tests/Functional/
fi
"