.travis.yml 1.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263
  1. # Travis CI build configuration for MediaWiki
  2. # <https://travis-ci.org/wikimedia/mediawiki-core>
  3. #
  4. # The Wikimedia Foundation uses a self-hosted Jenkins instance to run unit
  5. # tests, but it tests code against the version of PHP that is deployed on
  6. # Wikimedia's production cluster. This Travis CI configuration is designed to
  7. # complement that setup by testing MediaWiki on travis
  8. #
  9. language: php
  10. matrix:
  11. fast_finish: true
  12. include:
  13. - env: dbtype=mysql
  14. php: 5.5
  15. - env: dbtype=postgres
  16. php: 5.5
  17. - env: dbtype=mysql
  18. php: hhvm
  19. - env: dbtype=mysql
  20. php: 7
  21. services:
  22. - mysql
  23. branches:
  24. # Test changes in master and arbitrary Travis CI branches only.
  25. # The latter allows developers to enable Travis CI in their GitHub fork of
  26. # wikimedia/mediawiki and then push changes they like to test to branches like
  27. # "travis-ci/test-this-awesome-change".
  28. only:
  29. - master
  30. - /^travis-ci\/.*$/
  31. before_install:
  32. - sudo apt-get install -qq djvulibre-bin tidy
  33. - composer self-update --quiet --no-interaction
  34. before_script:
  35. - composer install --prefer-source --quiet --no-interaction
  36. - if [ "$dbtype" = postgres ]; then psql -c "CREATE DATABASE traviswiki WITH OWNER travis;" -U postgres; fi
  37. - >
  38. php maintenance/install.php traviswiki admin
  39. --pass travis
  40. --dbtype "$dbtype"
  41. --dbname traviswiki
  42. --dbuser travis
  43. --dbpass ""
  44. --scriptpath "/w"
  45. script:
  46. - php tests/phpunit/phpunit.php
  47. notifications:
  48. email: false
  49. irc:
  50. channels:
  51. - "chat.freenode.net#mediawiki-core"
  52. - "chat.freenode.net#mediawiki-feed"
  53. on_success: change
  54. on_failure: change
  55. skip_join: true