-
-
Notifications
You must be signed in to change notification settings - Fork 12
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Made SG compatible with the latest version of Lingo (#75)
* Made SG compatible with the latest version of Lingo that provides searching for specific search terms in the backend * Update RELEASE-NOTES.md * CI updates * Skip tests - finish whenever somebody has time to do so * Update required extensions * Remove @todo and mark GlossaryCacheRebuilderTest as skipped; also bumped version to v5 --------- Co-authored-by: Youri van den Bogert <yvdbogert@archixl.nl>
- Loading branch information
Showing
32 changed files
with
818 additions
and
196 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
# These are supported funding model platforms | ||
|
||
github: # Replace with up to 4 GitHub Sponsors-enabled usernames e.g., [user1, user2] | ||
patreon: # Replace with a single Patreon username | ||
open_collective: smw | ||
ko_fi: # Replace with a single Ko-fi username | ||
tidelift: # Replace with a single Tidelift platform-name/package-name e.g., npm/babel | ||
community_bridge: # Replace with a single Community Bridge project-name e.g., cloud-foundry | ||
liberapay: # Replace with a single Liberapay username | ||
issuehunt: # Replace with a single IssueHunt username | ||
otechie: # Replace with a single Otechie username | ||
custom: ['https://www.semantic-mediawiki.org/wiki/Sponsorship'] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,57 @@ | ||
name: CI | ||
|
||
on: | ||
push: | ||
branches: [ master ] | ||
pull_request: | ||
branches: [ master ] | ||
workflow_dispatch: | ||
|
||
jobs: | ||
|
||
test: | ||
|
||
runs-on: ubuntu-20.04 | ||
continue-on-error: ${{ matrix.experimental }} | ||
|
||
strategy: | ||
matrix: | ||
include: | ||
- mediawiki_version: '1.39' | ||
smw_version: dev-master | ||
php_version: 8.1 | ||
database_type: mysql | ||
database_image: "mariadb:10" | ||
coverage: false | ||
experimental: true | ||
env: | ||
MW_VERSION: ${{ matrix.mediawiki_version }} | ||
SMW_VERSION: ${{ matrix.smw_version }} | ||
PHP_VERSION: ${{ matrix.php_version }} | ||
DB_TYPE: ${{ matrix.database_type }} | ||
DB_IMAGE: ${{ matrix.database_image }} | ||
|
||
|
||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v4 | ||
with: | ||
submodules: recursive | ||
|
||
- name: Update submodules | ||
run: git submodule update --init --remote | ||
|
||
- name: Run tests | ||
run: make ci | ||
if: matrix.coverage == false | ||
|
||
- name: Run tests with coverage | ||
run: make ci-coverage | ||
if: matrix.coverage == true | ||
|
||
- name: Upload code coverage | ||
uses: codecov/codecov-action@v4 | ||
with: | ||
token: ${{ secrets.CODECOV_TOKEN }} | ||
files: coverage/php/coverage.xml | ||
if: matrix.coverage == true |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
[submodule "build"] | ||
path = build | ||
url = https://github.com/gesinn-it-pub/docker-compose-ci.git |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
-include .env | ||
export | ||
|
||
# setup for docker-compose-ci build directory | ||
# delete "build" directory to update docker-compose-ci | ||
|
||
ifeq (,$(wildcard ./build/)) | ||
$(shell git submodule update --init --remote) | ||
endif | ||
|
||
EXTENSION=SemanticGlossary | ||
|
||
# docker images | ||
MW_VERSION?=1.39 | ||
PHP_VERSION?=8.1 | ||
DB_TYPE?=sqlite | ||
DB_IMAGE?="" | ||
|
||
# extensions | ||
SMW_VERSION?=4.1.3 | ||
MM_VERSION ?= 3.1.0 | ||
LINGO_VERSION ?= "dev-master" | ||
|
||
# composer | ||
# Enables "composer update" inside of extension | ||
COMPOSER_EXT?=true | ||
|
||
# nodejs | ||
# Enables node.js related tests and "npm install" | ||
# NODE_JS?=true | ||
|
||
# check for build dir and git submodule init if it does not exist | ||
include build/Makefile |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
.vscode/* | ||
!.vscode/settings.json | ||
!.vscode/tasks.json | ||
!.vscode/launch.json | ||
!.vscode/extensions.json | ||
!.vscode/*.code-snippets | ||
|
||
# Local History for Visual Studio Code | ||
.history/ | ||
|
||
# Built Visual Studio Code Extensions | ||
*.vsix | ||
|
||
# Ignore the coverage output from local runs | ||
/coverage |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,147 @@ | ||
ARG MW_VERSION | ||
ARG PHP_VERSION | ||
FROM gesinn/mediawiki-ci:${MW_VERSION}-php${PHP_VERSION} | ||
|
||
ARG EXTENSION | ||
ARG MW_INSTALL_PATH | ||
ARG MW_VERSION | ||
ARG PHP_VERSION | ||
ARG PHP_EXTENSIONS | ||
ARG OS_PACKAGES | ||
ENV EXTENSION=${EXTENSION} | ||
ENV MW_INSTALL_PATH=${MW_INSTALL_PATH} | ||
ENV PHP_EXTENSIONS=${PHP_EXTENSIONS} | ||
ENV OS_PACKAGES=${OS_PACKAGES} | ||
|
||
# get needed dependencies for this extension | ||
RUN sed -i s/80/8080/g /etc/apache2/sites-available/000-default.conf /etc/apache2/ports.conf | ||
|
||
### SemanticMediaWiki | ||
ARG SMW_VERSION | ||
RUN if [ ! -z "${SMW_VERSION}" ]; then \ | ||
composer-require.sh mediawiki/semantic-media-wiki ${SMW_VERSION} && \ | ||
echo 'wfLoadExtension( "SemanticMediaWiki" );\n' \ | ||
'enableSemantics( $wgServer );\n' \ | ||
>> __setup_extension__; \ | ||
fi | ||
### SemanticMediaWiki | ||
|
||
### PageForms | ||
ARG PF_VERSION | ||
ARG PF_REPO | ||
RUN if [ ! -z "${PF_VERSION}" ]; then \ | ||
get-github-extension.sh PageForms ${PF_VERSION} ${PF_REPO} && \ | ||
echo 'wfLoadExtension( "PageForms" );\n' >> __setup_extension__; \ | ||
fi | ||
### PageForms | ||
|
||
### PageSchemas | ||
ARG PS_VERSION | ||
RUN if [ ! -z "${PS_VERSION}" ]; then \ | ||
get-github-extension.sh PageSchemas ${PS_VERSION} && \ | ||
echo 'wfLoadExtension( "PageSchemas" );\n' >> __setup_extension__; \ | ||
fi | ||
### PageSchemas | ||
|
||
### DisplayTitle | ||
ARG DT_VERSION | ||
RUN if [ ! -z "${DT_VERSION}" ]; then \ | ||
get-github-extension.sh DisplayTitle ${DT_VERSION} && \ | ||
echo 'wfLoadExtension( "DisplayTitle" );\n' >> __setup_extension__; \ | ||
fi | ||
### DisplayTitle | ||
|
||
### AdminLinks | ||
ARG AL_VERSION | ||
RUN if [ ! -z "${AL_VERSION}" ]; then \ | ||
get-github-extension.sh AdminLinks ${AL_VERSION} && \ | ||
echo 'wfLoadExtension( "AdminLinks" );\n' >> __setup_extension__; \ | ||
fi | ||
### AdminLinks | ||
|
||
### Maps | ||
ARG MAPS_VERSION | ||
RUN if [ ! -z "${MAPS_VERSION}" ]; then \ | ||
composer-require.sh mediawiki/maps ${MAPS_VERSION} && \ | ||
echo 'wfLoadExtension( "Maps" );\n' >> __setup_extension__; \ | ||
fi | ||
### Maps | ||
|
||
### SemanticResultFormats | ||
ARG SRF_VERSION | ||
RUN if [ ! -z "${SRF_VERSION}" ]; then \ | ||
composer-require.sh mediawiki/semantic-result-formats ${SRF_VERSION} && \ | ||
echo 'wfLoadExtension( "SemanticResultFormats" );\n' >> __setup_extension__; \ | ||
fi | ||
### SemanticResultFormats | ||
|
||
### Mermaid | ||
ARG MM_VERSION | ||
RUN if [ ! -z "${MM_VERSION}" ]; then \ | ||
composer-require.sh mediawiki/mermaid ${MM_VERSION} && \ | ||
echo 'wfLoadExtension( "Mermaid" );\n' >> __setup_extension__; \ | ||
fi | ||
### Mermaid | ||
|
||
### Lingo | ||
ARG LINGO_VERSION | ||
RUN if [ ! -z "${LINGO_VERSION}" ]; then \ | ||
composer-require.sh mediawiki/lingo ${LINGO_VERSION} && \ | ||
echo 'wfLoadExtension( "Lingo" );\n' >> __setup_extension__; \ | ||
fi | ||
### Lingo | ||
|
||
### chameleon | ||
ARG CHAMELEON_VERSION | ||
RUN if [ ! -z "${CHAMELEON_VERSION}" ]; then \ | ||
composer-require.sh mediawiki/chameleon-skin ${CHAMELEON_VERSION} && \ | ||
echo "wfLoadExtension( 'Bootstrap' );\n" \ | ||
"wfLoadSkin( 'chameleon' );\n" \ | ||
"\$wgDefaultSkin='chameleon';\n" \ >> __setup_extension__; \ | ||
fi | ||
### chameleon | ||
|
||
### Lingo | ||
ARG LINGO_VERSION | ||
RUN if [ ! -z "${LINGO_VERSION}" ]; then \ | ||
composer-require.sh mediawiki/lingo ${LINGO_VERSION} && \ | ||
echo 'wfLoadExtension( "Lingo" );\n' >> __setup_extension__; \ | ||
fi | ||
### Lingo | ||
|
||
RUN composer update | ||
|
||
COPY . /var/www/html/extensions/$EXTENSION | ||
|
||
RUN if [ ! -z "${SMW_VERSION}" ] || [ "${EXTENSION}" = "SemanticMediaWiki" ]; then \ | ||
chown -R www-data:www-data /var/www/html/extensions/SemanticMediaWiki/; \ | ||
fi | ||
|
||
ARG OS_PACKAGES | ||
RUN if [ ! -z "${OS_PACKAGES}" ] ; then apt-get update && apt-get install -y $OS_PACKAGES ; fi | ||
|
||
ARG PHP_EXTENSIONS | ||
RUN if [ ! -z "${PHP_EXTENSIONS}" ] ; then docker-php-ext-install $PHP_EXTENSIONS ; fi | ||
|
||
ARG COMPOSER_EXT | ||
RUN if [ ! -z "${COMPOSER_EXT}" ] ; then cd extensions/$EXTENSION && composer update ; fi | ||
|
||
ARG NODE_JS | ||
RUN if [ ! -z "${NODE_JS}" ] ; then cd extensions/$EXTENSION && npm install ; fi | ||
|
||
# special handling for testing SMW itself | ||
RUN if [ "${EXTENSION}" = "SemanticMediaWiki" ]; then \ | ||
COMPOSER=composer.local.json composer require --no-update --working-dir ${MW_INSTALL_PATH} mediawiki/semantic-media-wiki @dev && \ | ||
COMPOSER=composer.local.json composer config repositories.semantic-media-wiki '{"type": "path", "url": "extensions/SemanticMediaWiki"}' --working-dir ${MW_INSTALL_PATH} && \ | ||
composer update --working-dir ${MW_INSTALL_PATH}; \ | ||
fi | ||
|
||
RUN echo \ | ||
"wfLoadExtension( '$EXTENSION' );\n" \ | ||
>> __setup_extension__ | ||
|
||
COPY *__setup_extension__ setup_extension | ||
|
||
RUN if [ -f setup_extension ]; then \ | ||
cat setup_extension >> __setup_extension__; \ | ||
fi |
Oops, something went wrong.