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