Skip to content

Commit ed7995a

Browse files
committed
Add Travis CI job configuration for testing MediaWiki on HHVM
Travis CI is a popular continuous integration service that provides free automated testing to FOSS projects. Ten days ago, the HHVM team announced that Travis CI's build environment provides HHVM by default. This patch contains a Travis CI job configuration that runs MediaWiki's test suite using HHVM. Because we replicate changes to GitHub, merging this change and enabling the Travis CI hook in the repository configuration on GitHub will cause Travis CI to run the tests on each commit. Change-Id: Ia18cba5facb7f0b506e962df2f114338af571b8a
1 parent af38c83 commit ed7995a

File tree

1 file changed

+46
-0
lines changed

1 file changed

+46
-0
lines changed

.travis.yml

+46
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,46 @@
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 against HHVM.
8+
#
9+
language: php
10+
11+
php:
12+
- hhvm
13+
14+
services:
15+
- mysql
16+
17+
branches:
18+
# Test changes in master and in Wikimedia's production branches.
19+
only:
20+
- master
21+
- /^wmf\/.*$/
22+
23+
before_install:
24+
- sudo apt-get install -qq djvulibre-bin tidy
25+
26+
before_script:
27+
# Initialise submodules, in case we're testing a Wikimedia production branch.
28+
- git submodule update --init --recursive
29+
# Travis CI's HHVM environment provides PHPUnit as a phar file, but
30+
# MediaWiki's test suite only works if individual PHPUnit files are
31+
# actual files on disk (bug 58881).
32+
- composer require 'phpunit/phpunit=3.7.*'
33+
- >
34+
php maintenance/install.php testwiki admin
35+
--pass travis
36+
--dbname traviswiki
37+
--dbuser travis
38+
--dbpass ""
39+
--scriptpath "/w"
40+
41+
script:
42+
- >
43+
hhvm --php
44+
-d include_path=".$(printf ':%s' vendor/phpunit/*)"
45+
-d date.timezone="Etc/UTC"
46+
tests/phpunit/phpunit.php

0 commit comments

Comments
 (0)