Skip to content

Commit

Permalink
Add CI dependencies
Browse files Browse the repository at this point in the history
  • Loading branch information
malberts committed Nov 27, 2024
1 parent 52b2cbf commit f9dd7d7
Show file tree
Hide file tree
Showing 2 changed files with 32 additions and 0 deletions.
13 changes: 13 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,16 @@ jobs:

runs-on: ubuntu-latest

services:
elasticsearch:
image: docker-registry.wikimedia.org/releng/cirrus-elasticsearch:7.10.2-s0 # Compatibility info at https://www.mediawiki.org/wiki/Extension:CirrusSearch
ports:
- 9200:9200
- 9300:9300
env:
discovery.type: single-node
ES_JAVA_OPTS: "-Xms512m -Xmx512m -Dlog4j2.formatMsgNoLookups=true"

defaults:
run:
working-directory: mediawiki
Expand Down Expand Up @@ -70,6 +80,9 @@ jobs:
- name: Run update.php
run: php maintenance/update.php --quick

- name: Create ElasticSearch index
run: php extensions/CirrusSearch/maintenance/UpdateSearchIndexConfig.php

- name: Run PHPUnit
run: php tests/phpunit/phpunit.php -c extensions/WikibaseFacetedSearch/
if: matrix.mw != 'master'
Expand Down
19 changes: 19 additions & 0 deletions .github/workflows/installMediaWiki.sh
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,16 @@ $wgDevelopmentWarnings = true;
EOT

cat <<EOT >> LocalSettings.php
wfLoadExtension( 'Elastica' );
wfLoadExtension( 'CirrusSearch' );
\$wgCirrusSearchServers = [ 'localhost' ];
wfLoadExtension( 'WikibaseRepository', __DIR__ . '/extensions/Wikibase/extension-repo.json' );
require_once __DIR__ . '/extensions/Wikibase/repo/ExampleSettings.php';
wfLoadExtension( 'WikibaseCirrusSearch' );
\$wgWBCSUseCirrus = true;
wfLoadExtension( "$EXTENSION_NAME" );
EOT

Expand All @@ -31,9 +41,18 @@ cat <<EOT >> composer.local.json
"merge-plugin": {
"merge-dev": true,
"include": [
"extensions/Elastica/composer.json",
"extensions/CirrusSearch/composer.json",
"extensions/Wikibase/composer.json",
"extensions/$EXTENSION_NAME/composer.json"
]
}
}
}
EOT

cd extensions
git clone https://gerrit.wikimedia.org/r/mediawiki/extensions/Elastica --depth=1 --branch=$MW_BRANCH --recurse-submodules -j8
git clone https://gerrit.wikimedia.org/r/mediawiki/extensions/CirrusSearch --depth=1 --branch=$MW_BRANCH --recurse-submodules -j8
git clone https://gerrit.wikimedia.org/r/mediawiki/extensions/Wikibase --depth=1 --branch=$MW_BRANCH --recurse-submodules -j8
git clone https://gerrit.wikimedia.org/r/mediawiki/extensions/WikibaseCirrusSearch --depth=1 --branch=$MW_BRANCH --recurse-submodules -j8

0 comments on commit f9dd7d7

Please sign in to comment.