Follow-up 7960d53: Mark when the SecondaryDataUpdates and WikiPageDeletionUpdates...
[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 # Use Ubuntu 14 Trusty (not Ubuntu 12 Precise)
12 # <https://docs.travis-ci.com/user/reference/trusty/>
13 # - Required for non-buggy xml library for XmlTypeCheck/UploadBaseTest (T75176).
14 dist: trusty
15
16 # Cache NPM and Composer directories
17 # <https://docs.travis-ci.com/user/caching/>
18 cache:
19 npm: true
20 directories:
21 # Composer doesn't have a dedicated cache setting in Travis CI config, so set the directory path instead.
22 - vendor
23
24 matrix:
25 fast_finish: true
26 include:
27 - php: 7.3
28 - php: 7.2
29 - php: 7.1
30 - php: 7
31
32 services:
33 - mysql
34
35 branches:
36 # Test changes in master and arbitrary Travis CI branches only.
37 # The latter allows developers to enable Travis CI in their GitHub fork of
38 # wikimedia/mediawiki and then push changes for testing to branches like
39 # "travis-ci/test-this-awesome-change".
40 only:
41 - master
42 - /^travis-ci\/.*$/
43
44 addons:
45 apt:
46 packages:
47 - djvulibre-bin
48 - tidy
49
50 before_script:
51 - echo 'opcache.enable_cli = 1' >> ~/.phpenv/versions/$(phpenv version-name)/etc/conf.d/travis.ini
52 - composer install --prefer-source --quiet --no-interaction
53 # At Travis CI, the mysql user 'travis' doesn't have create database rights, use 'root' instead.
54 - >
55 php maintenance/install.php traviswiki admin
56 --pass travis
57 --dbtype "mysql"
58 --dbname traviswiki
59 --dbuser "root"
60 --dbpass ""
61 --scriptpath "/w"
62 - echo -en "\n\nrequire_once __DIR__ . '/includes/DevelopmentSettings.php';\n" >> ./LocalSettings.php
63 - php -l ./LocalSettings.php
64
65 script:
66 - php tests/phpunit/phpunit.php
67
68 notifications:
69 email: false
70 irc:
71 channels:
72 - "chat.freenode.net#wikimedia-dev"
73 template:
74 - "%{repository}#%{build_number} (%{branch} - %{commit} %{author}): %{message} - %{build_url}"
75 on_success: change
76 on_failure: always