Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
62 commits
Select commit Hold shift + click to select a range
ecd4539
Modernise CI
paladox Jan 5, 2025
0d98e96
Merge branch 'master' into fix-ci
paladox Jan 5, 2025
dd2945c
Fix
paladox Jan 5, 2025
02a6b0f
Update build
paladox Jan 7, 2025
c7f20c5
Update ci.yml
paladox Jan 8, 2025
a28b8eb
Update ci.yml
paladox Jan 8, 2025
fa8d975
Update ci.yml
paladox Jan 8, 2025
119b2dd
Update SemanticScribuntoJsonTestCaseScriptRunnerTest.php
paladox Jan 8, 2025
a1dab4c
Fix phpcs
paladox Jan 8, 2025
d5da560
Update phpunit.xml.dist
paladox Jan 8, 2025
57ac6fd
Update extension.json
paladox Jan 8, 2025
794e83c
Update SemanticScribuntoJsonTestCaseScriptRunnerTest.php
paladox Jan 8, 2025
39632fb
Update extension.json
paladox Jan 8, 2025
795e218
Update I18nJsonFileIntegrityTest.php
paladox Jan 8, 2025
5aed65f
Update SemanticScribuntoJsonTestCaseScriptRunnerTest.php
paladox Jan 8, 2025
dce417b
Update SemanticScribuntoJsonTestCaseScriptRunnerTest.php
paladox Jan 8, 2025
746c88b
Update SemanticScribuntoJsonTestCaseScriptRunnerTest.php
paladox Jan 8, 2025
4ea724e
Update SemanticScribuntoJsonTestCaseScriptRunnerTest.php
paladox Jan 8, 2025
c44b045
Update SemanticScribuntoJsonTestCaseScriptRunnerTest.php
paladox Jan 8, 2025
aac7768
Update SemanticScribuntoJsonTestCaseScriptRunnerTest.php
paladox Jan 8, 2025
d4bb1db
Update SemanticScribuntoJsonTestCaseScriptRunnerTest.php
paladox Jan 8, 2025
be6940d
Merge branch 'master' into fix-ci
paladox Jan 24, 2025
b8e3717
Update SemanticScribuntoJsonTestCaseScriptRunnerTest.php
paladox Jan 27, 2025
5217175
Update SemanticScribuntoJsonTestCaseScriptRunnerTest.php
paladox Jan 27, 2025
c89f6a7
Update extension.json
paladox Jan 27, 2025
71f639f
Update composer.json
paladox Jan 27, 2025
fc5955d
Update SemanticScribuntoJsonTestCaseScriptRunnerTest.php
paladox Feb 21, 2025
12b06ac
Update composer.json
paladox Feb 21, 2025
2e5390f
Update bootstrap.php
paladox Feb 21, 2025
f804230
Update SemanticScribuntoJsonTestCaseScriptRunnerTest.php
paladox Feb 21, 2025
0eb22d5
Update SemanticScribuntoJsonTestCaseScriptRunnerTest.php
paladox Feb 21, 2025
7ee97a9
Update SemanticScribuntoJsonTestCaseScriptRunnerTest.php
paladox Feb 21, 2025
caf503d
Update SemanticScribuntoJsonTestCaseScriptRunnerTest.php
paladox Feb 21, 2025
ed7b4f4
Update SemanticScribuntoJsonTestCaseScriptRunnerTest.php
paladox Feb 21, 2025
86d48d7
Update SemanticScribuntoJsonTestCaseScriptRunnerTest.php
paladox Feb 21, 2025
6af2ffb
Update SemanticScribuntoJsonTestCaseScriptRunnerTest.php
paladox Feb 21, 2025
05c4d86
Merge branch 'master' into fix-ci
paladox Feb 23, 2025
e7e22c0
Update ci.yml
paladox Jul 27, 2025
58599e5
Merge branch 'master' into fix-ci
paladox Nov 9, 2025
79a15fe
Update ci.yml
paladox Mar 26, 2026
197e3ec
Update ci.yml
paladox Mar 26, 2026
b89b842
Update SemanticScribuntoJsonTestCaseScriptRunnerTest.php
paladox Mar 26, 2026
4870719
Update SemanticScribuntoJsonTestCaseScriptRunnerTest.php
paladox Mar 26, 2026
07f876a
Update SemanticScribuntoJsonTestCaseScriptRunnerTest.php
paladox Mar 26, 2026
b1600cb
Update ScribuntoLuaLibraryTest.php
paladox Mar 26, 2026
3789b2b
Update LibraryFactoryTest.php
paladox Mar 26, 2026
0426b20
Update LibraryFactoryTest.php
paladox Mar 26, 2026
6db5a31
Update extension.json
paladox Mar 26, 2026
c476374
Update composer.json
paladox Mar 26, 2026
aa32390
Update extension.json
paladox Mar 26, 2026
d905b8a
Update extension.json
paladox Mar 26, 2026
cc1e882
Update LuaAskResultProcessorTest.php
paladox Mar 27, 2026
e9c26ee
Update LuaAskResultProcessorTest.php
paladox Mar 27, 2026
cb38c2b
Update LuaAskResultProcessorTest.php
paladox Mar 27, 2026
7989a6f
Update LuaAskResultProcessor.php
paladox Mar 27, 2026
b5745e4
Update LuaAskResultProcessor.php
paladox Mar 27, 2026
a65c71d
Update SemanticScribuntoJsonTestCaseScriptRunnerTest.php
paladox Mar 27, 2026
e4a8abc
Update Makefile
paladox Mar 27, 2026
64018ac
Update SemanticScribuntoJsonTestCaseScriptRunnerTest.php
paladox Mar 27, 2026
40fcbab
Update ask-001.json
paladox Mar 27, 2026
1705523
Update ask-001.json
paladox Mar 27, 2026
e831a9d
Update SemanticScribuntoJsonTestCaseScriptRunnerTest.php
paladox Mar 27, 2026
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
138 changes: 55 additions & 83 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,107 +5,79 @@ on:
branches: [ master ]
pull_request:
branches: [ "*" ]
workflow_dispatch:

jobs:

test:
name: "PHPUnit: MW ${{ matrix.mw }}, PHP ${{ matrix.php }} (TYPE ${{ matrix.type }})"

runs-on: ubuntu-latest
continue-on-error: ${{ matrix.experimental }}

strategy:
matrix:
include:
- mw: 'REL1_39'
php: 7.4
type: normal
experimental: false
- mw: 'REL1_39'
php: 8.0
type: coverage
- mediawiki_version: '1.43'
smw_version: dev-master
scribunto_version: REL1_39
php_version: 8.1
database_type: mysql
database_image: "mariadb:10"
coverage: false
experimental: false
- mw: 'REL1_39'
php: 8.1
type: normal
- mediawiki_version: '1.43'
smw_version: dev-master
scribunto_version: REL1_40
php_version: 8.2
database_type: mysql
database_image: "mariadb:11.2"
coverage: true
experimental: false
- mw: 'REL1_40'
php: 8.1
type: normal
- mediawiki_version: '1.44'
smw_version: dev-master
scribunto_version: REL1_41
php_version: 8.3
database_type: mysql
database_image: "mariadb:11.2"
coverage: false
experimental: false
- mw: 'REL1_41'
php: 8.1
type: normal
- mediawiki_version: '1.45'
smw_version: dev-master
scribunto_version: REL1_42
php_version: 8.4
database_type: mysql
database_image: "mariadb:11.2"
coverage: false
experimental: false
- mw: 'REL1_42'
php: 8.2
type: normal
experimental: false
- mw: 'master'
php: 8.3
type: normal
experimental: true

runs-on: ubuntu-latest
continue-on-error: ${{ matrix.experimental }}

defaults:
run:
working-directory: mediawiki

env:
MW_ROOT: mediawiki
TYPE: ${{ matrix.type }}

MW_VERSION: ${{ matrix.mediawiki_version }}
SMW_VERSION: ${{ matrix.smw_version }}
SCRIBUNTO_VERSION: ${{ matrix.scribunto_version }}
PHP_VERSION: ${{ matrix.php_version }}
DB_TYPE: ${{ matrix.database_type }}
DB_IMAGE: ${{ matrix.database_image }}

steps:
- name: Setup PHP
uses: shivammathur/setup-php@v2
- name: Checkout
uses: actions/checkout@v4
with:
php-version: ${{ matrix.php }}
extensions: mbstring, intl
tools: composer
submodules: recursive

- name: Cache MediaWiki
id: cache-mediawiki
uses: actions/cache@v4
with:
path: |
mediawiki
!mediawiki/extensions/
!mediawiki/vendor/
key: mw_${{ matrix.mw }}-php${{ matrix.php }}
- name: Update submodules
run: git submodule update --init --remote

- name: Cache Composer cache
uses: actions/cache@v4
with:
path: ~/.composer/cache
key: composer-php${{ matrix.php }}

- uses: actions/checkout@v4
with:
path: EarlyCopy
- name: Run tests
run: make ci
if: matrix.coverage == false

- name: Install MediaWiki
if: steps.cache-mediawiki.outputs.cache-hit != 'true'
working-directory: ~
run: bash EarlyCopy/.github/workflows/installWiki.sh ${{ matrix.mw }} SemanticScribunto
- name: Run tests with coverage
run: make ci-coverage
if: matrix.coverage == true

- uses: actions/checkout@v4
- name: Upload code coverage
uses: codecov/codecov-action@v4
with:
path: mediawiki/extensions/SemanticScribunto

- name: Composer update
run: composer update

- name: run update.php
run: php maintenance/update.php --quick

- if: env.TYPE != 'coverage'
name: Run PHPUnit w/o coverage
run: php tests/phpunit/phpunit.php -c extensions/SemanticScribunto/ --testsuite semantic-scribunto-unit

- if: env.TYPE == 'coverage'
name: Run PHPUnit w/ coverage
run: php tests/phpunit/phpunit.php -c extensions/SemanticScribunto/ --testsuite semantic-scribunto-unit --coverage-clover coverage.clover

- if: env.TYPE == 'coverage'
name: upload coverage report
working-directory: ~
run: bash EarlyCopy/.github/workflows/uploadCoverageReport.sh
token: ${{ secrets.CODECOV_TOKEN }}
files: coverage/php/coverage.xml
if: matrix.coverage == true
63 changes: 0 additions & 63 deletions .github/workflows/installWiki.sh

This file was deleted.

14 changes: 0 additions & 14 deletions .github/workflows/uploadCoverageReport.sh

This file was deleted.

10 changes: 0 additions & 10 deletions .github/workflows/uploadImages.sh

This file was deleted.

3 changes: 3 additions & 0 deletions .gitmodules
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
46 changes: 46 additions & 0 deletions .phpcs.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
<?xml version="1.0"?>
<ruleset>
<rule ref="./vendor/mediawiki/mediawiki-codesniffer/MediaWiki">
<exclude name="Generic.Files.LineLength.TooLong" />
<exclude name="MediaWiki.Commenting.FunctionComment.MissingDocumentationPrivate" />
<exclude name="MediaWiki.Commenting.FunctionComment.MissingParamTag" />
<exclude name="MediaWiki.Commenting.FunctionComment.MissingReturn" />
<exclude name="MediaWiki.NamingConventions.LowerCamelFunctionsName.FunctionName" />
<exclude name="MediaWiki.Commenting.FunctionComment.NoParamType" />
<exclude name="MediaWiki.Files.ClassMatchesFilename.NotMatch" />
<exclude name="MediaWiki.Commenting.FunctionComment.MissingDocumentationPublic" />
<exclude name="MediaWiki.Commenting.FunctionComment.MissingDocumentationProtected" />
<exclude name="MediaWiki.Commenting.FunctionComment.MissingDocumentationPrivate" />
<exclude name="Generic.CodeAnalysis.AssignmentInCondition.FoundInWhileCondition" />
<exclude name="Squiz.Classes.ValidClassName.NotCamelCaps" />
<exclude name="Generic.CodeAnalysis.AssignmentInCondition.Found" />
<exclude name="MediaWiki.Commenting.PropertyDocumentation.MissingDocumentationPrivate" />
<exclude name="MediaWiki.Commenting.PropertyDocumentation.MissingDocumentationProtected" />
<exclude name="MediaWiki.Commenting.PropertyDocumentation.MissingDocumentationPublic" />
<exclude name="MediaWiki.PHPUnit.AssertEmpty.AssertEmptyUsed" />
<exclude name="Squiz.Operators.ValidLogicalOperators.NotAllowed" />
<exclude name="Generic.ControlStructures.DisallowYodaConditions.Found" />
<exclude name="MediaWiki.Commenting.PropertyDocumentation.WrongStyle" />
<exclude name="Generic.Files.OneObjectStructurePerFile.MultipleFound" />
<exclude name="MediaWiki.NamingConventions.ValidGlobalName.allowedPrefix" />
<exclude name="MediaWiki.Usage.ExtendClassUsage.FunctionConfigUsage" />
<exclude name="MediaWiki.Usage.DeprecatedGlobalVariables.Deprecated$wgContLang" />
<exclude name="MediaWiki.WhiteSpace.SpaceBeforeSingleLineComment.NewLineComment" />
<exclude name="MediaWiki.Usage.DeprecatedGlobalVariables.Deprecated$wgTitle" />
<exclude name="Universal.WhiteSpace.CommaSpacing" />
<exclude name="MediaWiki.Commenting.MissingCovers.MissingCovers" />
</rule>
<rule ref="MediaWiki.NamingConventions.ValidGlobalName">
<properties>
<property name="allowedPrefixes" type="array" value="eg,wg" />
</properties>
</rule>
<rule ref="MediaWiki.Commenting.FunctionComment.ObjectTypeHintReturn">
<severity>0</severity>
</rule>
<file>.</file>
<exclude-pattern>/(vendor|conf)/</exclude-pattern>
<exclude-pattern type="relative">extensions/*</exclude-pattern>
<arg name="extensions" value="php"/>
<arg name="encoding" value="UTF-8"/>
</ruleset>
33 changes: 33 additions & 0 deletions Makefile
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=SemanticScribunto

# docker images
MW_VERSION?=1.43
PHP_VERSION?=8.1
DB_TYPE?=mysql
DB_IMAGE?="mariadb:10"

# extensions
SMW_VERSION?=dev-master
SCRIBUNTO_VERSION?=REL1_43

# 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

1 change: 1 addition & 0 deletions build
Submodule build added at e4652c
2 changes: 2 additions & 0 deletions codecov.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
fixes:
- "/var/www/html/extensions/SemanticScribunto/::"
Loading
Loading