Skip to content

Commit

Permalink
.travis.yml file is out of date, auto-updating .travis.yml file.
Browse files Browse the repository at this point in the history
  • Loading branch information
Piwik Automation committed Jan 27, 2015
1 parent 4b65fa6 commit 57558d8
Showing 1 changed file with 19 additions and 22 deletions.
41 changes: 19 additions & 22 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -52,33 +52,24 @@ install:
- cp -R .git/ $PLUGIN_NAME/
- cp .travis.yml $PLUGIN_NAME
# checkout piwik in the current directory
- git clone https://github.com/piwik/piwik.git piwik
- git clone -q https://github.com/piwik/piwik.git piwik
- cd piwik
- git fetch --all
- |
if [ "$TEST_AGAINST_PIWIK_BRANCH" == "" ]; then
if [ "$TEST_AGAINST_CORE" == "latest_stable" ]; then
export TEST_AGAINST_PIWIK_BRANCH=$(git describe --tags `git rev-list --tags --max-count=1`)
export TEST_AGAINST_PIWIK_BRANCH=`echo $TEST_AGAINST_PIWIK_BRANCH | tr -d ' ' | tr -d '\n'`
else
export TEST_AGAINST_PIWIK_BRANCH=master
fi
fi
- echo "Testing against '$TEST_AGAINST_PIWIK_BRANCH'"
- git checkout "$TEST_AGAINST_PIWIK_BRANCH"
- git submodule init
- git submodule update || true
- git fetch -q --all
- ./tests/travis/checkout_test_against_branch.sh
- git submodule init -q
- git submodule update -q || true

# move plugin contents to folder in the plugins subdirectory
- rm -rf plugins/$PLUGIN_NAME
- mv ../$PLUGIN_NAME plugins

# copy .coveralls.yml if none exists
- if [ ! -f ../coveralls.yml ];
then cp .coveralls.yml ../coveralls.yml;
then cp .coveralls.yml ../coveralls.yml || true;
fi

# make sure travis test scripts are always latest (so in older releases/branches, the latest scripts will still be used)
- git checkout master -- ./tests/travis ./plugins/TestRunner || true
- git checkout master -q -- ./tests/travis ./plugins/TestRunner || true
# clone dependent repos
- ./tests/travis/checkout_dependent_plugins.sh

Expand All @@ -104,10 +95,15 @@ before_script:

# configure mysql
- mysql -e "SET GLOBAL sql_mode = 'NO_ENGINE_SUBSTITUTION,STRICT_TRANS_TABLES'" # Travis default
- mysql -e "SET GLOBAL wait_timeout = 3600" # try to avoid mysql has gone away errors
# 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;"
# - mysql -e "SHOW GLOBAL VARIABLES;"


# 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
Expand All @@ -117,13 +113,14 @@ before_script:
# print out more debugging info
- uname -a
- date
# - php -i
- 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
- travis_retry sudo apt-get update > /dev/null
- travis_retry sudo apt-get install python2.6 python2.6-dev -y --force-yes > /dev/null

# Log Analytics works with Python 2.6 or 2.7 but we want to test on 2.6
- python2.6 --version
Expand All @@ -132,7 +129,7 @@ before_script:
- ./tests/travis/prepare.sh
- ./tests/travis/setup_webserver.sh

- export GENERATE_TRAVIS_YML_COMMAND="php ./console generate:travis-yml --plugin=\"LoginLdap\" --php-versions=\"5.3,5.6\""
- export GENERATE_TRAVIS_YML_COMMAND="php ./console generate:travis-yml --plugin=\"LoginLdap\" --php-versions=\"5.3,5.6\" --verbose"
- ./tests/travis/autoupdate_travis_yml.sh

- cd tests/PHPUnit
Expand Down

0 comments on commit 57558d8

Please sign in to comment.