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
14 # Use Trusty instead of Travis default (precise)
15 # - Required in order to use HHVM 3.6 or higher.
16 # - Required for non-buggy xml library for XmlTypeCheck/UploadBaseTest (T75176).
22 # On Trusty, mysql user 'travis' doesn't have create database rights
23 # Postgres has no user called 'root'.
24 - env: dbtype=mysql dbuser=root
26 - env: dbtype=postgres dbuser=travis
28 - env: dbtype=mysql dbuser=root
29 # https://docs.travis-ci.com/user/languages/php#HHVM-versions
30 # https://github.com/travis-ci/travis-ci/issues/7368
32 - env: dbtype=mysql dbuser=root
39 # Test changes in master and arbitrary Travis CI branches only.
40 # The latter allows developers to enable Travis CI in their GitHub fork of
41 # wikimedia/mediawiki and then push changes for testing to branches like
42 # "travis-ci/test-this-awesome-change".
54 - composer install --prefer-source --quiet --no-interaction
55 - if [ "$dbtype" = postgres ]; then psql -c "CREATE DATABASE traviswiki WITH OWNER travis;" -U postgres; fi
57 php maintenance/install.php traviswiki admin
66 - php tests/phpunit/phpunit.php
72 - "chat.freenode.net#mediawiki-feed"