Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add dependencies to CI #2

Merged
merged 1 commit into from
Nov 27, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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