Skip to content

Commit 8f92bcd

Browse files
authored
Merge pull request #124 from wmde/cicici
Update the CI build
2 parents b949525 + 07be405 commit 8f92bcd

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

47 files changed

+152
-16627
lines changed

.eslintignore

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,2 @@
1-
lib/jquery/**
2-
lib/qunit/**
3-
lib/qunit.parameterize/**
4-
lib/require/**
51
node_modules/**
62
vendor/**

.travis.yml

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -3,14 +3,14 @@ language: php
33
php:
44
- 5.5
55

6-
env:
7-
- RUNJOB=eslint
8-
- RUNJOB=qunit
9-
106
before_script:
117
- nvm install 4
8+
- npm install
9+
- composer install
1210

13-
script: bash ./build/travis/script.sh
11+
script:
12+
- npm test
13+
- composer test
1414

1515
notifications:
1616
irc:

DataValuesJavaScript.php

Lines changed: 4 additions & 51 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,10 @@
1414
require_once __DIR__ . '/vendor/autoload.php';
1515
}
1616

17+
if ( !defined( 'MEDIAWIKI' ) ) {
18+
return 1;
19+
}
20+
1721
$GLOBALS['wgExtensionCredits']['datavalues'][] = [
1822
'path' => __DIR__,
1923
'name' => 'DataValues JavaScript',
@@ -34,54 +38,3 @@
3438
include __DIR__ . '/lib/resources.php',
3539
include __DIR__ . '/src/resources.php'
3640
);
37-
38-
/**
39-
* Register QUnit test base classes used by test modules in dependent components.
40-
* @see https://www.mediawiki.org/wiki/Manual:Hooks/ResourceLoaderTestModules
41-
* @since 0.1
42-
*
43-
* @param array &$testModules
44-
* @param \ResourceLoader &$resourceLoader
45-
*
46-
* @return boolean
47-
*/
48-
$GLOBALS['wgHooks']['ResourceLoaderTestModules'][] = function(
49-
array &$testModules,
50-
\ResourceLoader &$resourceLoader
51-
) {
52-
preg_match( '+' . preg_quote( DIRECTORY_SEPARATOR ) . '(?:vendor|extensions)'
53-
. preg_quote( DIRECTORY_SEPARATOR ) . '.*+', __DIR__, $remoteExtPath );
54-
55-
$moduleTemplate = [
56-
'localBasePath' => __DIR__ . '/tests',
57-
'remoteExtPath' => '..' . $remoteExtPath[0] . DIRECTORY_SEPARATOR . 'tests',
58-
];
59-
60-
$testModuleTemplates = [
61-
'valueFormatters.tests' => $moduleTemplate + [
62-
'scripts' => [
63-
'src/valueFormatters/valueFormatters.tests.js',
64-
],
65-
'dependencies' => [
66-
'dataValues.DataValue',
67-
'util.inherit',
68-
'valueFormatters',
69-
],
70-
],
71-
72-
'valueParsers.tests' => $moduleTemplate + [
73-
'scripts' => [
74-
'src/valueParsers/valueParsers.tests.js',
75-
],
76-
'dependencies' => [
77-
'dataValues.DataValue',
78-
'util.inherit',
79-
'valueParsers',
80-
],
81-
],
82-
];
83-
84-
$testModules['qunit'] = array_merge( $testModules['qunit'], $testModuleTemplates );
85-
86-
return true;
87-
};

build/travis/script.sh

Lines changed: 0 additions & 16 deletions
This file was deleted.

config.js

Lines changed: 0 additions & 230 deletions
This file was deleted.

karma.conf.js

Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
module.exports = function ( config ) {
2+
config.set( {
3+
frameworks: [ 'qunit' ],
4+
5+
files: [
6+
'node_modules/jquery/dist/jquery.js',
7+
'lib/util/util.inherit.js',
8+
'lib/globeCoordinate/globeCoordinate.js',
9+
'lib/globeCoordinate/globeCoordinate.GlobeCoordinate.js',
10+
'lib/globeCoordinate/globeCoordinate.Formatter.js',
11+
'src/dataValues.js',
12+
'src/DataValue.js',
13+
'src/values/*.js',
14+
'src/valueFormatters/valueFormatters.js',
15+
'src/valueFormatters/formatters/ValueFormatter.js',
16+
'src/valueFormatters/formatters/*.js',
17+
'src/valueParsers/valueParsers.js',
18+
'src/valueParsers/ValueParserStore.js',
19+
'src/valueParsers/parsers/ValueParser.js',
20+
'src/valueParsers/parsers/*.js',
21+
'tests/lib/globeCoordinate/*.js',
22+
'tests/src/dataValues.tests.js',
23+
'tests/src/dataValues.DataValue.tests.js',
24+
'tests/src/values/*.js',
25+
'tests/src/valueFormatters/valueFormatters.tests.js',
26+
'tests/src/valueFormatters/formatters/*.js',
27+
'tests/src/valueParsers/valueParsers.tests.js',
28+
'tests/src/valueParsers/ValueParserStore.tests.js',
29+
'tests/src/valueParsers/parsers/*.js'
30+
],
31+
32+
port: 9876,
33+
34+
logLevel: config.LOG_INFO,
35+
browsers: [ 'PhantomJS' ]
36+
} );
37+
};

0 commit comments

Comments
 (0)