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
11 # Use Ubuntu 14 Trusty (not Ubuntu 12 Precise)
12 # <https://docs.travis-ci.com/user/reference/trusty/>
13 # - Required for non-buggy xml library for XmlTypeCheck/UploadBaseTest (T75176).
16 # Cache NPM and Composer directories
17 # <https://docs.travis-ci.com/user/caching/>
21 # Composer doesn't have a dedicated cache setting in Travis CI config, so set the directory path instead.
36 # Test changes in master and arbitrary Travis CI branches only.
37 # The latter allows developers to enable Travis CI in their GitHub fork of
38 # wikimedia/mediawiki and then push changes for testing to branches like
39 # "travis-ci/test-this-awesome-change".
51 - echo 'opcache.enable_cli = 1' >> ~/.phpenv/versions/$(phpenv version-name)/etc/conf.d/travis.ini
52 - composer install --prefer-source --quiet --no-interaction
53 # At Travis CI, the mysql user 'travis' doesn't have create database rights, use 'root' instead.
55 php maintenance/install.php traviswiki admin
62 - echo -en "\n\nrequire_once __DIR__ . '/includes/DevelopmentSettings.php';\n" >> ./LocalSettings.php
63 - php -l ./LocalSettings.php
66 - php tests/phpunit/phpunit.php
72 - "chat.freenode.net#wikimedia-dev"
74 - "%{repository}#%{build_number} (%{branch} - %{commit} %{author}): %{message} - %{build_url}"