Localisation updates from https://translatewiki.net.
[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
12 # Use fast containers instead of the slower sudo-enabled VMs:
13 sudo: false
14 # Use Ubuntu 14 Trusty (not Ubuntu 12 Precise)
15 # <https://docs.travis-ci.com/user/reference/trusty/>
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 git:
21 depth: 3
22 quiet: true
23
24 # Cache NPM and Composer directories
25 # <https://docs.travis-ci.com/user/caching/>
26 cache:
27 npm: true
28 directories:
29 # Composer doesn't have a dedicated cache setting in Travis CI config, so set the directory path instead.
30 - vendor
31
32 matrix:
33 fast_finish: true
34 include:
35 # On Trusty, mysql user 'travis' doesn't have create database rights
36 # Postgres has no user called 'root'.
37 - env: dbtype=mysql dbuser=root
38 php: 7.2
39 - env: dbtype=mysql dbuser=root
40 php: 7.1
41 - env: dbtype=postgres dbuser=travis
42 php: 7.1
43 - env: dbtype=mysql dbuser=root
44 php: 7
45 # https://docs.travis-ci.com/user/languages/php#HHVM-versions
46 - env: dbtype=mysql dbuser=root
47 php: hhvm-3.24
48 - env: dbtype=mysql dbuser=root
49 php: hhvm-3.21
50 - env: dbtype=mysql dbuser=root
51 php: hhvm-3.18
52 allow_failures:
53 - php: hhvm-3.18
54 - php: hhvm-3.21
55 - php: hhvm-3.24
56
57 services:
58 - mysql
59
60 branches:
61 # Test changes in master and arbitrary Travis CI branches only.
62 # The latter allows developers to enable Travis CI in their GitHub fork of
63 # wikimedia/mediawiki and then push changes for testing to branches like
64 # "travis-ci/test-this-awesome-change".
65 only:
66 - master
67 - /^travis-ci\/.*$/
68
69 addons:
70 apt:
71 packages:
72 - djvulibre-bin
73 - tidy
74
75 before_script:
76 - composer install --prefer-source --quiet --no-interaction
77 - if [ "$dbtype" = postgres ]; then psql -c "CREATE DATABASE traviswiki WITH OWNER travis;" -U postgres; fi
78 - >
79 php maintenance/install.php traviswiki admin
80 --pass travis
81 --dbtype "$dbtype"
82 --dbname traviswiki
83 --dbuser "$dbuser"
84 --dbpass ""
85 --scriptpath "/w"
86 - echo -en "\n\nrequire_once __DIR__ . '/includes/DevelopmentSettings.php';\n" >> ./LocalSettings.php
87 - php -l ./LocalSettings.php
88
89 script:
90 - php tests/phpunit/phpunit.php
91
92 notifications:
93 email: false
94 irc:
95 channels:
96 - "chat.freenode.net#wikimedia-dev"
97 template:
98 - "%{repository}#%{build_number} (%{branch} - %{commit} %{author}): %{message} - %{build_url}"
99 on_success: change
100 on_failure: always