diff options
Diffstat (limited to 'plugins/FileSynchronizer/.travis.yml')
-rw-r--r-- | plugins/FileSynchronizer/.travis.yml | 132 |
1 files changed, 132 insertions, 0 deletions
diff --git a/plugins/FileSynchronizer/.travis.yml b/plugins/FileSynchronizer/.travis.yml new file mode 100644 index 0000000000..ecc6f3996a --- /dev/null +++ b/plugins/FileSynchronizer/.travis.yml @@ -0,0 +1,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=FileSynchronizer + - PIWIK_ROOT_DIR=$TRAVIS_BUILD_DIR/piwik + - PIWIK_LATEST_STABLE_TEST_TARGET=2.15.0-b3 + - secure: "GwPMT+B1vLoyQLVcbvWPU3FZl1UvMFufQhlVKxnAy+FSmMamMCiNRd/XpYhB/zER1TuKQvSgWmZjFXrab6ih98MRJEvc+ae0nqCduSRvlPOWWOWkerUdeKJOis0tjaPdzBzdgIiP2lrw/TF+7Mo4CNPE0i8XDcoGjBQRT9dmgQpg130zasTdxkdp484NKFb8busQEBXZmAHYDLkF6u+hDVvcf1zR7ebOGPyEfTJCItvN/CCUvznj02zPUouknpdAuMGmlQmQD4KzhlV68NlBurB2dE9KG7LlIlX6fvnpxK/DiTNDrUvbAgBGUMmu1wKgC7mE9j1jYAwbWMldttBGQa7G81AP1l73w8SAyTXbyKLzf0g2hfaoQV/IEG2I6tQ6SicWkyapjJ8pGsHWhr7JS6z5LO/OQpHaytegEXga8CuUMPxj3U9BBQ7XEiGyMvVF2qBtL5KDvSZXPbDUlNzYCaiNJBZKuBLqaKowU7r91GkcSph8KSVg8lKq9DouUi7m65x21zAjLEEtTqtM5vRPcUFq3Nmvs1vYH+q5Su/35kXnH78sx8W2R/0oBgp6SaHOMKLw5l7KpZrL8Y5BL//mhnPs2llUnSYVKwyLiyCEG1QjiS9KfGYOD1WJ4UkXsbBWtSuwM0loV9VWa+DXSuE+zIA3Zu0jP9gbwqEWZEYBXZ0=" + - secure: "ABmkRR2PtfFy2+ebTdaBzekuydJ7VyEE9z2DeO9e1FUVD2BS0oJ0blf3iJDXxrb50ypMRcfjnipM8UZFcHIC+H949gV/9OWyaV1r2iog0XvbouTZHDWG2DN4fAqnghMNgS5yavQGPTyiYZTgPKW85jE6PTvx0mj9sOg3fur1djb4f8V+CHl0bIO84udhpAXHDlu0/UK20vfhF02QwI9HPsFWqsej8FQFxzJHevYjGJGgHWOf/m8phd0r0Ag6K52S4bkmoLIL4bfU9KuujU76k6DFzAyoKEgxlpRXfomRutj4vRcjOX4vLy7PnOXkYc1fAI+Evstb+Bsczqa8C2BQe17VRaevx0wy6XXpoLkbvMJzZNapOFqnZmYxB2b1N1M4gKJF1seFsJ5WECSP2IVX/e0CY/rTC7RhXUO5c+MhqajXv/9rdPfy4dDCKQ/Ag1NhlYjRL2ybtKS/vFO3Kt5ImI0fLr6sibqfCnrddkhSZ2zlyvi4IA596EUSqfZZNa5j//j3gllAuDMyCzc8MEb10mMl6vrYiU8mGVOcG4xyHssXHaUSas9wTV2bmEVcjXc1rkn/f7pvMAwlMv9K5a8t3Zm+8k5sF2DwHguzO9g4UqJd9QBAnO5oKtPcdN6yQS30768YFI1ojXwn+YCRGDXjbn/DtRzRwHSyWHnPlNoDPh4=" + 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=\"FileSynchronizer\" --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 |