You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 

49 lines
1.4 KiB

  1. language: php
  2. php:
  3. - 5.3
  4. - 5.4
  5. before_script:
  6. # export virtual display
  7. - export DISPLAY=:99
  8. # change application working folders for write access
  9. - chmod -R 0777 ./tmp
  10. - chmod -R 0777 ./uploads
  11. - chmod -R 0777 ./templates/cache/
  12. - chmod -R 0777 ./templates/compiled/
  13. - cp ./install/*.sql tests/fixtures/sql/
  14. - rm -rf ./install
  15. # install required PHP stuff
  16. - sudo apt-get update
  17. - sudo apt-get install php5 php5-cli php5-mysql php5-mcrypt php5-xsl php5-xdebug php-apc php5-gd php5-curl php5-intl mysql-server mysql-client
  18. # launch apache, MySQL and PHPUnit Selenium installers
  19. - ./tests/travis/apache_setup.sh
  20. - ./tests/travis/mysql_setup.sh
  21. - mysql -u root -e "USE social_test; SHOW TABLES;" | wc -l
  22. - cp ./config/config.test.php.dist config/config.test.php
  23. - cp ./config/config.test.php.dist config/config.local.php
  24. - sudo sed -i s/sql-mode/#sql-mode/ /etc/mysql/my.cnf
  25. - sudo /etc/init.d/mysql restart
  26. - sleep 5
  27. # get HTML of main page (for debug)
  28. - firefox --version
  29. - wget -S http://livestreet.test -O /dev/null
  30. # start virtual display
  31. - sh -e /etc/init.d/xvfb start
  32. - sleep 5
  33. # download and launch Selenium
  34. - wget -O /tmp/selenium-server-standalone.jar http://selenium.dev.stfalcon.com/selenium-server-standalone-latest.jar
  35. - java -jar /tmp/selenium-server-standalone.jar > /dev/null &
  36. - sleep 5
  37. script: HTTP_APP_ENV=test php tests/behat/behat.phar -c tests/behat/behat.yml