Resources.php: Mark some closures as static
[mediawiki.git] / .travis.yml
blob60dbf149d013574d38a0f00a6e7e1e27bc75972d
1 # Travis CI build configuration for MediaWiki
2 # <https://travis-ci.org/wikimedia/mediawiki-core>
4 # Wikimedia Foundation uses self-hosted Jenkins CI to run unit tests
5 # against the versions of PHP built for Wikimedia's production cluster.
6 # This Travis CI configuration serves to independently verify that MediaWiki
7 # tests also pass on unmodified Ubuntu installs with official PHP packages.
8 language: php
10 # Use Ubuntu 14 Trusty (not Ubuntu 12 Precise)
11 # <https://docs.travis-ci.com/user/reference/trusty/>
12 # - Required for non-buggy xml library for XmlTypeCheck/UploadBaseTest (T75176).
13 dist: trusty
15 # Cache NPM and Composer directories
16 # <https://docs.travis-ci.com/user/caching/>
17 cache:
18   npm: true
19   directories:
20   # Composer doesn't have a dedicated cache setting in Travis CI config, so set the directory path instead.
21   - vendor
23 matrix:
24   fast_finish: true
25   include:
26     - php: 7.2
27     - php: 7.3
28     - php: 7.4
30 branches:
31   # Test changes in master and arbitrary Travis CI branches only.
32   # The latter allows developers to enable Travis CI in their GitHub fork of
33   # wikimedia/mediawiki and then push changes for testing to branches like
34   # "travis-ci/test-this-awesome-change".
35   only:
36     - master
37     - /^travis-ci\/.*$/
39 addons:
40   apt:
41     packages:
42     - djvulibre-bin
43     - tidy
45 before_script:
46   - echo 'opcache.enable_cli = 1' >> ~/.phpenv/versions/$(phpenv version-name)/etc/conf.d/travis.ini
47   # Force composer 1.x because MediaWiki/composer-merge-plugin don't support composer 2.x yet
48   - composer self-update --1
49   - composer install --prefer-dist --quiet --no-interaction
50   - composer mw-install:sqlite
51   - echo -en "\n\nrequire_once __DIR__ . '/includes/DevelopmentSettings.php';\n" >> ./LocalSettings.php
52   - php -l ./LocalSettings.php
54 script:
55   - php tests/phpunit/phpunit.php
57 notifications:
58   email: false
59   irc:
60     channels:
61       - "chat.freenode.net#wikimedia-dev"
62     template:
63       - "%{repository}#%{build_number} (%{branch} - %{commit} %{author}): %{message} - %{build_url}"
64     on_success: change
65     on_failure: always