f2cb40edeab8f89728cce597bdb3366267f536ff
[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 group: edge
15 # Use Trusty instead of Travis default (precise)
16 # - Required in order to use HHVM 3.6 or higher.
17 # - Required for non-buggy xml library for XmlTypeCheck/UploadBaseTest (T75176).
18 dist: trusty
19
20 matrix:
21 fast_finish: true
22 include:
23 # On Trusty, mysql user 'travis' doesn't have create database rights
24 # Postgres has no user called 'root'.
25 - env: dbtype=mysql dbuser=root
26 php: 5.5
27 - env: dbtype=postgres dbuser=travis
28 php: 5.5
29 - env: dbtype=mysql dbuser=root
30 # https://docs.travis-ci.com/user/languages/php#HHVM-versions
31 # https://github.com/travis-ci/travis-ci/issues/7368
32 php: hhvm-3.12
33 - env: dbtype=mysql dbuser=root
34 php: 7
35
36 services:
37 - mysql
38
39 branches:
40 # Test changes in master and arbitrary Travis CI branches only.
41 # The latter allows developers to enable Travis CI in their GitHub fork of
42 # wikimedia/mediawiki and then push changes for testing to branches like
43 # "travis-ci/test-this-awesome-change".
44 only:
45 - master
46 - /^travis-ci\/.*$/
47
48 before_install:
49 - sudo apt-get install -qq djvulibre-bin tidy
50 - composer self-update --quiet --no-interaction
51
52 before_script:
53 - composer install --prefer-source --quiet --no-interaction
54 - if [ "$dbtype" = postgres ]; then psql -c "CREATE DATABASE traviswiki WITH OWNER travis;" -U postgres; fi
55 - >
56 php maintenance/install.php traviswiki admin
57 --pass travis
58 --dbtype "$dbtype"
59 --dbname traviswiki
60 --dbuser "$dbuser"
61 --dbpass ""
62 --scriptpath "/w"
63
64 script:
65 - php tests/phpunit/phpunit.php
66
67 notifications:
68 email: false
69 irc:
70 channels:
71 - "chat.freenode.net#mediawiki-feed"
72 on_success: change
73 on_failure: change
74 skip_join: true