.travis.yml 2.4 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586
  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. # Use fast containers instead of the slower sudo-enabled VMs:
  11. sudo: false
  12. # Use Ubuntu 14 Trusty (not Ubuntu 12 Precise)
  13. # <https://docs.travis-ci.com/user/reference/trusty/>
  14. # - Required in order to use HHVM 3.6 or higher.
  15. # - Required for non-buggy xml library for XmlTypeCheck/UploadBaseTest (T75176).
  16. dist: trusty
  17. matrix:
  18. fast_finish: true
  19. include:
  20. # On Trusty, mysql user 'travis' doesn't have create database rights
  21. # Postgres has no user called 'root'.
  22. - env: dbtype=mysql dbuser=root
  23. php: 5.5
  24. - env: dbtype=postgres dbuser=travis
  25. php: 5.5
  26. # https://docs.travis-ci.com/user/languages/php#HHVM-versions
  27. - env: dbtype=mysql dbuser=root
  28. php: hhvm-3.18
  29. - env: dbtype=mysql dbuser=root
  30. php: hhvm-3.21
  31. - env: dbtype=mysql dbuser=root
  32. php: hhvm-3.24
  33. - env: dbtype=mysql dbuser=root
  34. php: 7
  35. - env: dbtype=mysql dbuser=root
  36. php: 7.1
  37. - env: dbtype=mysql dbuser=root
  38. php: 7.2
  39. services:
  40. - mysql
  41. branches:
  42. # Test changes in master and arbitrary Travis CI branches only.
  43. # The latter allows developers to enable Travis CI in their GitHub fork of
  44. # wikimedia/mediawiki and then push changes for testing to branches like
  45. # "travis-ci/test-this-awesome-change".
  46. only:
  47. - master
  48. - /^travis-ci\/.*$/
  49. addons:
  50. apt:
  51. packages:
  52. - djvulibre-bin
  53. - tidy
  54. before_script:
  55. - composer install --prefer-source --quiet --no-interaction
  56. - if [ "$dbtype" = postgres ]; then psql -c "CREATE DATABASE traviswiki WITH OWNER travis;" -U postgres; fi
  57. - >
  58. php maintenance/install.php traviswiki admin
  59. --pass travis
  60. --dbtype "$dbtype"
  61. --dbname traviswiki
  62. --dbuser "$dbuser"
  63. --dbpass ""
  64. --scriptpath "/w"
  65. - echo -en "\n\nrequire_once __DIR__ . '/includes/DevelopmentSettings.php';\n" >> ./LocalSettings.php
  66. - php -l ./LocalSettings.php
  67. script:
  68. - php tests/phpunit/phpunit.php
  69. notifications:
  70. email: false
  71. irc:
  72. channels:
  73. - "chat.freenode.net#mediawiki-feed"
  74. on_success: change
  75. on_failure: change
  76. skip_join: true