blob: f725aed17691f13fb260d37dbfb92ed3c3697873 (
plain)
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
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
|
# do not edit this file manually, instead run the generate:travis-yml console command
# if you are a Piwik core developer, edit this template file to auto generate the .travis.yml: https://github.com/piwik/piwik/blob/master/plugins/CoreConsole/templates/travis.yml.twig
# when modifying this file, please consider whether your changes should apply to plugin .travis.yml files. if not, check whether the pluginName twig var is empty,
# otherwise your changes will be synced with every plugin that uses an auto generated .travis.yml
# also please test generation before committing by running ./console generate:travis-yml --core and ./console generate:travis-yml --plugin=CustomAlerts
# and making sure the .travis.yml files are changed correctly
language: php
php:
- 5.6
- 5.3.3
# - hhvm
# Separate different test suites
env:
matrix:
# PDO Mysql
- TEST_SUITE=SystemTests MYSQL_ADAPTER=PDO_MYSQL
- TEST_SUITE=IntegrationTests MYSQL_ADAPTER=PDO_MYSQL
- TEST_SUITE=UnitTests MYSQL_ADAPTER=PDO_MYSQL
# Javascript tests
- TEST_SUITE=JavascriptTests MYSQL_ADAPTER=PDO_MYSQL
- TEST_SUITE=AngularJSTests MYSQL_ADAPTER=PDO_MYSQL
# All tests after another
- TEST_SUITE=AllTests MYSQL_ADAPTER=PDO_MYSQL
- TEST_SUITE=AllTests MYSQL_ADAPTER=MYSQLI
global:
- PIWIK_ROOT_DIR=$TRAVIS_BUILD_DIR
- secure: "AMhZmPZx4SUcuZRBzGHlQPxzM4D8FvFB3UThDa52gbi9KIBrwcumzV2VGi6B\n5fgjwtB4XTE1In7qhY2HMikPWBmWYYOQ5QcMPJsqqHt4iMmahx8WKzne6NOk\nNpqAuje/fulNGeP2LJZi0nrub3Fh4VwXaOvpNloKNQN/2JuqPtM="
- secure: "DySde80fX3dw0osGY5s5lGiGLjMleUkkONsuRDC4xjT1hAQP94FGHpPXVZV8\nAQY0s8MQmcK2eRLOQrmE9Bh1XXbGqh40s66XhSWq0hulFHxQH5OLaZXccFeu\n5WxGkHXnNDIc+CVhXW/IIbHZPO1K6hffS8fuvP1o6mYgxwFL6Xw="
- secure: "CW73pDjcaabpSL7bWiWIQLydKmvLzA1gWNv/zK0VcAKezQtCAQbqpIY1+B56wOhkaCWa7P+xdd2gUWEtvvdRKEC0sZcgCdHD5pQx390e5PWCMQTFO+doAElI4w4DMATCbH890Wcw2rotiZcjlkPYY+urIpUlcRsl6mMtBVQuQ9c="
matrix:
fast_finish: true
allow_failures:
- php: hhvm
- php: 5.6
env: MYSQL_ADAPTER=PDO_MYSQL COVERAGE=Integration
- php: 5.6
env: MYSQL_ADAPTER=PDO_MYSQL COVERAGE=Unit
include:
# Code Coverage
- php: 5.6
env: MYSQL_ADAPTER=PDO_MYSQL COVERAGE=Integration
- php: 5.6
env: MYSQL_ADAPTER=PDO_MYSQL COVERAGE=Unit
exclude:
# Run test suites separately only on PHP 5.4 with PDO
- php: 5.3.3
env: TEST_SUITE=SystemTests MYSQL_ADAPTER=PDO_MYSQL
- php: 5.3.3
env: TEST_SUITE=IntegrationTests MYSQL_ADAPTER=PDO_MYSQL
- php: 5.3.3
env: TEST_SUITE=UnitTests MYSQL_ADAPTER=PDO_MYSQL
- php: hhvm
env: TEST_SUITE=SystemTests MYSQL_ADAPTER=PDO_MYSQL
- php: hhvm
env: TEST_SUITE=IntegrationTests MYSQL_ADAPTER=PDO_MYSQL
- php: hhvm
env: TEST_SUITE=UnitTests MYSQL_ADAPTER=PDO_MYSQL
# run all tests not on PHP 5.6 and run MySQLI tests only on 5.6
- php: 5.6
env: TEST_SUITE=AllTests MYSQL_ADAPTER=PDO_MYSQL
- php: 5.3.3
env: TEST_SUITE=AllTests MYSQL_ADAPTER=MYSQLI
- php: hhvm
env: TEST_SUITE=AllTests MYSQL_ADAPTER=MYSQLI
# Javascript tests need to run only on one PHP version
- php: 5.3.3
env: TEST_SUITE=JavascriptTests MYSQL_ADAPTER=PDO_MYSQL
- php: hhvm
env: TEST_SUITE=JavascriptTests MYSQL_ADAPTER=PDO_MYSQL
# AngularJS tests need to run only on one PHP version
- php: 5.3.3
env: TEST_SUITE=AngularJSTests MYSQL_ADAPTER=PDO_MYSQL
- php: hhvm
env: TEST_SUITE=AngularJSTests MYSQL_ADAPTER=PDO_MYSQL
script: $PIWIK_ROOT_DIR/tests/travis/travis.sh
before_install:
# do not use the Zend allocator on PHP 5.3 since it will randomly segfault after program execution
- '[[ "$TRAVIS_PHP_VERSION" == 5.3* ]] && export USE_ZEND_ALLOC=0 || true'
install:
# make sure travis test scripts are always latest (so in older releases/branches, the latest scripts will still be used)
- git fetch
- git checkout master -- ./tests/travis ./plugins/CoreConsole || true
before_script:
- if ([ -n "$TEST_SUITE" ]);
then phpenv config-rm xdebug.ini;
fi
- if ([ -z "$TEST_SUITE" ] || [ -n "$PLUGIN_NAME" ]);
then composer require satooshi/php-coveralls dev-master;
fi
- ./tests/travis/configure_git.sh
# print out mysql information
- mysql --version
- mysql -e "SELECT VERSION();"
# configure mysql
- mysql -e "SET GLOBAL sql_mode = 'NO_ENGINE_SUBSTITUTION,STRICT_TRANS_TABLES'" # Travis default
# Uncomment to enable sql_mode STRICT_TRANS_TABLES (new default in Mysql 5.6)
- mysql -e "SET GLOBAL sql_mode = 'NO_ENGINE_SUBSTITUTION'"
- mysql -e "SELECT @@sql_mode;"
- mysql -e "SHOW GLOBAL VARIABLES;"
# Start UI tests
- ./tests/travis/initiate_ui_tests.sh
# travis now complains about this failing 9 times out of 10, so removing it. hopefully the random failures it prevented won't come back
# - travis_retry composer self-update
- travis_retry composer install
# print out more debugging info
- uname -a
- date
- php -r "var_dump(gd_info());"
- mysql -e 'create database piwik_tests;'
# Make sure we use Python 2.6
- travis_retry sudo add-apt-repository ppa:fkrull/deadsnakes -y
- travis_retry sudo apt-get update
- travis_retry sudo apt-get install python2.6 python2.6-dev -y --force-yes
# Log Analytics works with Python 2.6 or 2.7 but we want to test on 2.6
- python2.6 --version
- python --version
- ./tests/travis/prepare.sh
- ./tests/travis/setup_webserver.sh
- export GENERATE_TRAVIS_YML_COMMAND="php ./console generate:travis-yml --core"
- ./tests/travis/autoupdate_travis_yml.sh
- cd tests/PHPUnit
after_script:
# change directory back to root travis dir
- cd $PIWIK_ROOT_DIR
- if ([ -z "$TEST_SUITE" ] || [ -n "$PLUGIN_NAME" ]);
then php vendor/bin/coveralls -v;
fi
# output contents of files w/ debugging info to screen
- cat /var/log/nginx/error.log
- cat $PIWIK_ROOT_DIR/tmp/php-fpm.log
- cat $PIWIK_ROOT_DIR/tmp/logs/piwik.log
- cat $PIWIK_ROOT_DIR/config/config.ini.php
# upload test artifacts (for debugging travis failures)
- ./tests/travis/upload_artifacts.sh
after_success:
- cd $PIWIK_ROOT_DIR
- ./tests/travis/generate_docs.sh
notifications:
slack:
rooms:
- piwik:3HWhNh21qPfDACQXTrJOb0mW
- piwikpro:7OABSbDrywSTo2nv9lD2svXG
on_success: change
on_failure: change
irc:
skip_join: true
on_success: change
on_failure: change
channels:
- "irc.freenode.org#piwik-dev"
template:
- "%{repository} (%{commit}) : %{message} %{foo} "
- "Build details: %{build_url}"
|