blob: 1fc816a0d09a87efd719bb4274d1bdc449b23dee (
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
|
# do not edit this file manually, instead run the generate:travis-yml console command
language: php
php:
- 5.6
- 5.3.3
# - hhvm
services:
- redis-server
# Separate different test suites
env:
global:
- PLUGIN_NAME=AutoLogImporter
- PIWIK_ROOT_DIR=$TRAVIS_BUILD_DIR/piwik
- PIWIK_LATEST_STABLE_TEST_TARGET=2.15.0-b4
- secure: "uSQcAHxwIABymCg+L6ZzEasENSAIuRGXlpnhr7Rt+GrLLtSYnviBSsgGYuafLMs6AcnA7OQEv1e97N20B2JKPfG9TArpwFxGG6tqipZlV58bdd/HZ2MmJIzSf8bnkvvCOxNdzKR4myL07v9nCE9qvJef5lx9JHX+MH6pZzPX9QZmei4DoR+UweyW86AGpNVwNhRcCXzw6GQ/32n8kpj3fUEr7aZ6jRLtxxQMxTnSJq1Yr8hI7TgprzHq5Da36zVxzjxNPJdgUKreROqjuqA4zgB4QgYSNXNUbe4cto8HPFteRxyw5OqWHTAWV/wrK7yo1Vq4kU8jrUKjbzVPudR21NY4teicra2qANtyPVrqTXRkeUwcBEEeWYByEq84gz/bsk9luiwAKZHH4/26zT8RGoLVKRWI16cuBN8WQxvrvZBgoiJ9n2gxerfeKqZizzzY+67RrzYwjDTtYyAwXkp8H4TELKZO/oEimrEy2oEVu4R7UwijwugHgg8d65S1B/UaWtdUHFIhcMP/FjSwdNRikk24a/koTnqVKh0LWBHxPnmV9lLW6CVgSVN2xiVPQe4RWggnNcVlhkLTNkJzpN5ISYALN20mmaKq/PpdOdPbhsRWXObmCFhv89Ot54HaHixUB99B60I0zvwxX9j2C1nHUxWXzwxkePBLAZxNRBeJR2U="
- secure: "VYNfBVkaKl2AbmmW6jAp6UVFQA1z0acKyPrP7IQN2eFGXVn/mCgNBKwpVcNxVbrGre02MQhRI/8TCsPdZDCEa74mobozZ0ef87qF/eVgRQQjgxcVZ69QBL32K2VBg/RCwuC/WlnaFBTOn/ElkpJNYRJNUjWTLtw3lgIdi6zN4ZfBfvELuczi//n++KYH75MYnF//yX1+BD/4BQyC+yYLvc+NcdErTxQUS81C3nlp/VqKpqA0OQ+aNqtKb+MSNrHDH9K286oha8R2fJBR3YZvjCzrK8I2/+iF26lnnLaOfalMJjrdJXVV1w/OGps1hLYev5FMrNmBjgbKZP5E7SOJlfLbvbHtDI140ZXZbBLD4anMO0Uvc0cCfnk8QAu9kUvVq+nBszmBmArEvU4LTuvPqxJVU92kw8WYOA+AoSrT34mTq58rpo1sECQxtx8ivCKLRA6SMYlE7+m0quwhn/CnAeBfsOViEYhK6nkp/N/tyk39rgQ+F+JVm/AtVm/AVuKWlzxbYkI3m7eQ6oB5/BD4l1rI4ZWkYCyHAQkUAHCGsX8c2mQGOWJIOdz7Tm+Is+vFaGA6mS0JwxqXN8USs/3iUHh0VYAO1jp16QZ2/1IeO9hzx9Bj1oH/q7/JXpVeyuWMevqyQ9bWbYQvM1eOLXPIMyDgFOj9yL43ebe9leU3lQ0="
matrix:
- TEST_SUITE=PluginTests MYSQL_ADAPTER=PDO_MYSQL TEST_AGAINST_PIWIK_BRANCH=$PIWIK_LATEST_STABLE_TEST_TARGET
- TEST_SUITE=PluginTests MYSQL_ADAPTER=PDO_MYSQL TEST_AGAINST_CORE=minimum_required_piwik
- TEST_SUITE=UITests MYSQL_ADAPTER=PDO_MYSQL TEST_AGAINST_PIWIK_BRANCH=$PIWIK_LATEST_STABLE_TEST_TARGET
matrix:
exclude:
# execute latest stable tests only w/ PHP 5.5
- php: 5.3.3
env: TEST_SUITE=PluginTests MYSQL_ADAPTER=PDO_MYSQL TEST_AGAINST_CORE=minimum_required_piwik
# execute UI tests only w/ PHP 5.6
- php: 5.3.3
env: TEST_SUITE=UITests MYSQL_ADAPTER=PDO_MYSQL TEST_AGAINST_PIWIK_BRANCH=$PIWIK_LATEST_STABLE_TEST_TARGET
sudo: required
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:
# move all contents of current repo (which contains the plugin) to a new directory
- mkdir $PLUGIN_NAME
- cp -R !($PLUGIN_NAME) $PLUGIN_NAME
- cp -R .git/ $PLUGIN_NAME/
- cp .travis.yml $PLUGIN_NAME
# checkout piwik in the current directory
- git clone -q https://github.com/piwik/piwik.git piwik
- cd piwik
- git fetch -q --all
- git submodule update
# make sure travis-scripts repo is latest for initial travis setup
- '[ -d ./tests/travis/.git ] || sh -c "rm -rf ./tests/travis && git clone https://github.com/piwik/travis-scripts.git ./tests/travis"'
- cd ./tests/travis ; git checkout master ; cd ../..
- export GENERATE_TRAVIS_YML_COMMAND="php ./tests/travis/generator/main.php generate:travis-yml --plugin=\"AutoLogImporter\" --verbose"
- '[[ "$TRAVIS_JOB_NUMBER" != *.1 || "$TRAVIS_PULL_REQUEST" != "false" ]] || ./tests/travis/autoupdate_travis_yml.sh'
- ./tests/travis/checkout_test_against_branch.sh
- '[ ! -f ./tests/travis/install_mysql_5.6.sh ] || ./tests/travis/install_mysql_5.6.sh'
# Make sure we use Python 2.6
- '[ ! -f ./tests/travis/install_python_2.6.sh ] || ./tests/travis/install_python_2.6.sh'
- ./tests/travis/configure_git.sh
# travis now complains about this failing 9 times out of 10, so removing it
#- travis_retry composer self-update
- '[ "$SKIP_COMPOSER_INSTALL" == "1" ] || travis_retry composer install'
# move plugin contents to folder in the plugins subdirectory
- rm -rf plugins/$PLUGIN_NAME
- mv ../$PLUGIN_NAME plugins
# clone dependent repos
- ./tests/travis/checkout_dependent_plugins.sh
before_script:
- phpenv config-rm xdebug.ini;
# add always_populate_raw_post_data=-1 to php.ini
- echo "always_populate_raw_post_data=-1" >> ~/.phpenv/versions/$(phpenv version-name)/etc/php.ini
# disable opcache to avoid random failures on travis
- echo "opcache.enable=0" >> ~/.phpenv/versions/$(phpenv version-name)/etc/php.ini
# 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
# try to avoid mysql has gone away errors
- mysql -e "SET GLOBAL wait_timeout = 36000;"
- mysql -e "SET GLOBAL max_allowed_packet = 134209536;"
- mysql -e "SHOW VARIABLES LIKE 'max_allowed_packet';"
- mysql -e "SHOW VARIABLES LIKE 'wait_timeout';"
- mysql -e "SELECT @@sql_mode;"
# - mysql -e "SHOW GLOBAL VARIABLES;"
# print out more debugging info
- uname -a
- date
- php -r "var_dump(gd_info());"
- mysql -e 'create database piwik_tests;'
- ./tests/travis/prepare.sh
- ./tests/travis/setup_webserver.sh
- cd tests/PHPUnit
after_script:
# change directory back to root travis dir
- cd $PIWIK_ROOT_DIR
# 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
|