Deprecate WikiRevision::$importer
[mediawiki.git] / .travis.yml
blob5e2c7a00db91cd3a00ffd1ff503faabc2cf80d23
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
9 language: php
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
13 sudo: required
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).
17 dist: trusty
19 matrix:
20   fast_finish: true
21   include:
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
25       php: 5.5
26     - env: dbtype=postgres dbuser=travis
27       php: 5.5
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
31       php: hhvm-3.12
32     - env: dbtype=mysql dbuser=root
33       php: 7
35 services:
36   - mysql
38 branches:
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".
43   only:
44     - master
45     - /^travis-ci\/.*$/
47 addons:
48   apt:
49     packages:
50     - djvulibre-bin
51     - tidy
53 before_script:
54   - composer install --prefer-source --quiet --no-interaction
55   - if [ "$dbtype" = postgres ]; then psql -c "CREATE DATABASE traviswiki WITH OWNER travis;" -U postgres; fi
56   - >
57       php maintenance/install.php traviswiki admin
58       --pass travis
59       --dbtype "$dbtype"
60       --dbname traviswiki
61       --dbuser "$dbuser"
62       --dbpass ""
63       --scriptpath "/w"
65 script:
66   - php tests/phpunit/phpunit.php
68 notifications:
69   email: false
70   irc:
71     channels:
72       - "chat.freenode.net#mediawiki-feed"
73     on_success: change
74     on_failure: change
75     skip_join: true