Skip to content

Commit

Permalink
Add CI for MW 1.42/43 (#896)
Browse files Browse the repository at this point in the history
* Add CI for MW 1.42/43

* Update SemanticResultFormats.utils.php

* Update ResourcesTest.php

* Update JsonTestCaseScriptRunnerTest.php

* Update JsonTestCaseScriptRunnerTest.php

* Update listwidget-01.json

* Update listwidget-01.json

* Update carousel-01.json
  • Loading branch information
paladox authored Dec 30, 2024
1 parent ff52a47 commit 7679b15
Show file tree
Hide file tree
Showing 5 changed files with 38 additions and 5 deletions.
18 changes: 18 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,24 @@ jobs:
database_image: "mariadb:11.2"
coverage: false
experimental: false
- mediawiki_version: '1.42'
smw_version: dev-master
pf_version: 5.9
sfs_version: dev-master
php_version: 8.1
database_type: mysql
database_image: "mariadb:11.2"
coverage: false
experimental: false
- mediawiki_version: '1.43'
smw_version: dev-master
pf_version: 5.9
sfs_version: dev-master
php_version: 8.1
database_type: mysql
database_image: "mariadb:11.2"
coverage: false
experimental: false

env:
MW_VERSION: ${{ matrix.mediawiki_version }}
Expand Down
4 changes: 2 additions & 2 deletions SemanticResultFormats.utils.php
Original file line number Diff line number Diff line change
Expand Up @@ -76,12 +76,12 @@ public static function htmlQueryResultLink( $link ) {
* @return string|WrappedString HTML
*/
public static function makeVariablesScript( $data, $nonce = null ) {
$script = ResourceLoader::makeConfigSetScript( $data );
$script = MediaWiki\ResourceLoader\ResourceLoader::makeConfigSetScript( $data );
if ( $nonce === null ) {
$nonce = RequestContext::getMain()->getOutput()->getCSP()->getNonce();
}

return ResourceLoader::makeInlineScript( $script, $nonce );
return MediaWiki\ResourceLoader\ResourceLoader::makeInlineScript( $script, $nonce );
}

}
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,9 @@
{
"type": "parser",
"about": "#0",
"skip-on": {
"mediawiki": [ ">1.42.x", "Check assertions for MW higher then 1.42." ]
},
"subject": "Test/Carousel/T.1",
"assert-output": {
"to-contain": [
Expand All @@ -60,6 +63,9 @@
{
"type": "parser",
"about": "#1",
"skip-on": {
"mediawiki": [ ">1.42.x", "Check assertions for MW higher then 1.42." ]
},
"subject": "Test/Carousel/T.2",
"assert-output": {
"to-contain": [
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,9 @@
{
"type": "parser-html",
"about": "#0 Listwidget - alphabet - unordered",
"skip-on": {
"mediawiki": [ ">1.41.x", "Check assertions for MW higher then 1.41." ]
},
"subject": "Listwidget - alphabet - unordered",
"assert-output": {
"to-contain": [
Expand All @@ -61,6 +64,9 @@
{
"type": "parser-html",
"about": "#1 Listwidget - menu - listtype unspecified",
"skip-on": {
"mediawiki": [ ">1.41.x", "Check assertions for MW higher then 1.41." ]
},
"subject": "Listwidget - menu - listtype unspecified",
"assert-output": {
"to-contain": [
Expand All @@ -71,6 +77,9 @@
{
"type": "parser-html",
"about": "#2 Listwidget - pagination - ordered",
"skip-on": {
"mediawiki": [ ">1.41.x", "Check assertions for MW higher then 1.41." ]
},
"subject": "Listwidget - pagination - ordered",
"assert-output": {
"to-contain": [
Expand Down
6 changes: 3 additions & 3 deletions tests/phpunit/Integration/ResourcesTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@
namespace SRF\Tests\Integration;

use MediaWiki\MediaWikiServices;
use ResourceLoader;
use ResourceLoaderContext;
use MediaWiki\ResourceLoader\Context;
use MediaWiki\ResourceLoader\ResourceLoader;

/**
* Tests for resource definitions and files
Expand Down Expand Up @@ -36,7 +36,7 @@ private function getSRFResourceModules() {
public function moduleDataProvider() {
$resourceLoader = MediaWikiServices::getInstance()->getResourceLoader();

$context = ResourceLoaderContext::newDummyContext();
$context = Context::newDummyContext();
$modules = $this->getSRFResourceModules();

return [ [ $modules, $resourceLoader, $context ] ];
Expand Down

0 comments on commit 7679b15

Please sign in to comment.