Write TravisCI build matrix in more readable and extandable manner
[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
11 matrix:
12 fast_finish: true
13 include:
14 - env: dbtype=mysql
15 php: 5.3
16 - env: dbtype=postgres
17 php: 5.3
18 - env: dbtype=mysql
19 php: hhvm
20
21 services:
22 - mysql
23
24 branches:
25 # Test changes in master, in Wikimedia's production and in arbitrary
26 # Travis CI branches. The latter allows developers to enable Travis
27 # CI in their GitHub fork of wikimedia/mediawiki and then push
28 # changes they like to test to branches like
29 # "travis-ci/test-this-awesome-change" without having to mess up the
30 # master and wmf/* branches and their defined meaning.
31 only:
32 - master
33 - /^travis-ci\/.*$/
34 - /^wmf\/.*$/
35
36 before_install:
37 - sudo apt-get install -qq djvulibre-bin tidy
38 - composer self-update --quiet --no-interaction
39
40 before_script:
41 - composer install --prefer-source --quiet --no-interaction
42 - if [ "$dbtype" = postgres ]; then psql -c "CREATE DATABASE traviswiki WITH OWNER travis;" -U postgres; fi
43 - >
44 php maintenance/install.php traviswiki admin
45 --pass travis
46 --dbtype "$dbtype"
47 --dbname traviswiki
48 --dbuser travis
49 --dbpass ""
50 --scriptpath "/w"
51
52 script:
53 - php tests/phpunit/phpunit.php
54
55 notifications:
56 email: false
57 irc:
58 channels:
59 - "chat.freenode.net#mediawiki-core"
60 - "chat.freenode.net#mediawiki-feed"
61 on_success: change
62 on_failure: change
63 skip_join: true