1 # Travis CI build configuration for MediaWiki
2 # <https://travis-ci.org/wikimedia/mediawiki-core>
4 # Wikimedia Foundation uses self-hosted Jenkins CI to run unit tests
5 # against the versions of PHP built for Wikimedia's production cluster.
6 # This Travis CI configuration serves to independently verify that MediaWiki
7 # tests also pass on unmodified Ubuntu installs with official PHP packages.
10 # Use Ubuntu 14 Trusty (not Ubuntu 12 Precise)
11 # <https://docs.travis-ci.com/user/reference/trusty/>
12 # - Required for non-buggy xml library for XmlTypeCheck/UploadBaseTest (T75176).
15 # Cache NPM and Composer directories
16 # <https://docs.travis-ci.com/user/caching/>
20 # Composer doesn't have a dedicated cache setting in Travis CI config, so set the directory path instead.
31 # Test changes in master and arbitrary Travis CI branches only.
32 # The latter allows developers to enable Travis CI in their GitHub fork of
33 # wikimedia/mediawiki and then push changes for testing to branches like
34 # "travis-ci/test-this-awesome-change".
46 - echo 'opcache.enable_cli = 1' >> ~/.phpenv/versions/$(phpenv version-name)/etc/conf.d/travis.ini
47 # Force composer 1.x because MediaWiki/composer-merge-plugin don't support composer 2.x yet
48 - composer self-update --1
49 - composer install --prefer-dist --quiet --no-interaction
50 - composer mw-install:sqlite
51 - echo -en "\n\nrequire_once __DIR__ . '/includes/DevelopmentSettings.php';\n" >> ./LocalSettings.php
52 - php -l ./LocalSettings.php
55 - php tests/phpunit/phpunit.php
61 - "chat.freenode.net#wikimedia-dev"
63 - "%{repository}#%{build_number} (%{branch} - %{commit} %{author}): %{message} - %{build_url}"