1 # Travis CI build configuration for MediaWiki
2 # <https://travis-ci.org/wikimedia/mediawiki-core>
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
10 # Use the slower sudo-enabled VMs instead of fast containers:
11 # - Package 'djvulibre-bin' is not yet whitelisted for trusty containers.
12 # https://github.com/travis-ci/apt-package-whitelist/issues/4036
15 # Use Trusty instead of Travis default (precise)
16 # - Required in order to use HHVM 3.6 or higher.
17 # - Required for non-buggy xml library for XmlTypeCheck/UploadBaseTest (T75176).
23 # On Trusty, mysql user 'travis' doesn't have create database rights
24 # Postgres has no user called 'root'.
25 - env: dbtype=mysql dbuser=root
27 - env: dbtype=postgres dbuser=travis
29 - env: dbtype=mysql dbuser=root
30 # https://docs.travis-ci.com/user/languages/php#HHVM-versions
31 # https://github.com/travis-ci/travis-ci/issues/7368
33 - env: dbtype=mysql dbuser=root
40 # Test changes in master and arbitrary Travis CI branches only.
41 # The latter allows developers to enable Travis CI in their GitHub fork of
42 # wikimedia/mediawiki and then push changes for testing to branches like
43 # "travis-ci/test-this-awesome-change".
49 - sudo apt-get install -qq djvulibre-bin tidy
50 - composer self-update --quiet --no-interaction
53 - composer install --prefer-source --quiet --no-interaction
54 - if [ "$dbtype" = postgres ]; then psql -c "CREATE DATABASE traviswiki WITH OWNER travis;" -U postgres; fi
56 php maintenance/install.php traviswiki admin
65 - php tests/phpunit/phpunit.php
71 - "chat.freenode.net#mediawiki-feed"