Merge "Change Title::getPreviousRevisionID (and next) to ignore PRIMARY"
[lhc/web/wiklou.git] / .travis.yml
1 # Travis CI build configuration for MediaWiki
2 # <https://travis-ci.org/wikimedia/mediawiki-core>
3 #
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
8 #
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
18
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
34 allow_failures:
35 # Postgres support for unit tests is still buggy
36 # https://phabricator.wikimedia.org/T75174
37 - env: dbtype=postgres dbuser=travis
38 php: 5.5
39
40 services:
41 - mysql
42
43 branches:
44 # Test changes in master and arbitrary Travis CI branches only.
45 # The latter allows developers to enable Travis CI in their GitHub fork of
46 # wikimedia/mediawiki and then push changes for testing to branches like
47 # "travis-ci/test-this-awesome-change".
48 only:
49 - master
50 - /^travis-ci\/.*$/
51
52 addons:
53 apt:
54 packages:
55 - djvulibre-bin
56 - tidy
57
58 before_script:
59 - composer install --prefer-source --quiet --no-interaction
60 - if [ "$dbtype" = postgres ]; then psql -c "CREATE DATABASE traviswiki WITH OWNER travis;" -U postgres; fi
61 - >
62 php maintenance/install.php traviswiki admin
63 --pass travis
64 --dbtype "$dbtype"
65 --dbname traviswiki
66 --dbuser "$dbuser"
67 --dbpass ""
68 --scriptpath "/w"
69
70 script:
71 - php tests/phpunit/phpunit.php
72
73 notifications:
74 email: false
75 irc:
76 channels:
77 - "chat.freenode.net#mediawiki-feed"
78 on_success: change
79 on_failure: change
80 skip_join: true