Services: Convert PasswordReset's static to a const now HHVM is gone
[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
30 services:
31 - mysql
32
33 branches:
34 # Test changes in master and arbitrary Travis CI branches only.
35 # The latter allows developers to enable Travis CI in their GitHub fork of
36 # wikimedia/mediawiki and then push changes for testing to branches like
37 # "travis-ci/test-this-awesome-change".
38 only:
39 - master
40 - /^travis-ci\/.*$/
41
42 addons:
43 apt:
44 packages:
45 - djvulibre-bin
46 - tidy
47
48 before_script:
49 - echo 'opcache.enable_cli = 1' >> ~/.phpenv/versions/$(phpenv version-name)/etc/conf.d/travis.ini
50 - composer install --prefer-source --quiet --no-interaction
51 # At Travis CI, the mysql user 'travis' doesn't have create database rights, use 'root' instead.
52 - >
53 php maintenance/install.php traviswiki admin
54 --pass travis
55 --dbtype "mysql"
56 --dbname traviswiki
57 --dbuser "root"
58 --dbpass ""
59 --scriptpath "/w"
60 - echo -en "\n\nrequire_once __DIR__ . '/includes/DevelopmentSettings.php';\n" >> ./LocalSettings.php
61 - php -l ./LocalSettings.php
62
63 script:
64 - php tests/phpunit/phpunit.php
65
66 notifications:
67 email: false
68 irc:
69 channels:
70 - "chat.freenode.net#wikimedia-dev"
71 template:
72 - "%{repository}#%{build_number} (%{branch} - %{commit} %{author}): %{message} - %{build_url}"
73 on_success: change
74 on_failure: always