Skip to content

Commit 9ad1033

Browse files
malbertsclaude
andcommitted
[TEST — DO NOT MERGE] try unified phpunit runner with --group filter
Throwaway experiment to find out whether `--group mediawiki-databaseless` short-circuits PHPUnit's test discovery *before* the suite-time hazards fire — i.e. whether modern PHPUnit skips loading test files whose class-level group annotation doesn't match the filter. Predictions for each matrix entry, given the failure mode each branch showed in earlier iterations: - REL1_39 — under the new runner, Scribunto's Scribunto_LuaEngineTestBase::suite() static method blew up at discovery time on MediaWikiServices::getParserFactory(). If --group filtering short-circuits class load, this entry should now pass. Otherwise same failure as before. - REL1_40, REL1_41, REL1_42 — never reached in the prior big-bang attempt (matrix-mate cancellation). Now we'll see. - REL1_43 — same as above. - master — Scribunto_LuaEngineTestBase class wasn't autoloadable (renamed/namespaced on current Scribunto). Same load-vs-filter question. Only LuaLibrary* tests carry `@group Database`; all other unit tests carry `@group mediawiki-databaseless` and would be the ones actually run. Also pulls in two supporting changes from #77 so master has a chance: * installWiki.sh: git clone instead of wget tarball (phpunit.xml.template ships in git but is export-ignored from the archive) * MediaWiki cache key bumped to a one-off `-experiment` suffix so the experimental install actually runs and doesn't shadow itself onto other PRs' caches Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
1 parent 68dde37 commit 9ad1033

2 files changed

Lines changed: 17 additions & 9 deletions

File tree

‎.github/workflows/ci.yml‎

Lines changed: 14 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,7 @@ jobs:
7474
mediawiki
7575
!mediawiki/extensions/
7676
!mediawiki/vendor/
77-
key: mw_${{ matrix.mw }}-php${{ matrix.php }}
77+
key: mw_${{ matrix.mw }}-php${{ matrix.php }}-experiment
7878

7979
- name: Cache Composer cache
8080
uses: actions/cache@v4
@@ -103,12 +103,21 @@ jobs:
103103
run: bash EarlyCopy/.github/workflows/uploadImages.sh
104104

105105
- if: env.TYPE != 'coverage'
106-
name: Run PHPUnit w/o coverage
107-
run: php tests/phpunit/phpunit.php -c extensions/BootstrapComponents/ --testsuite bootstrap-components-unit
106+
name: '[TEST] Run PHPUnit (unified runner, --group mediawiki-databaseless)'
107+
run: |
108+
(composer phpunit:config 2>/dev/null || true)
109+
vendor/bin/phpunit -c extensions/BootstrapComponents/phpunit.xml.dist \
110+
--bootstrap tests/phpunit/bootstrap.php \
111+
--group mediawiki-databaseless
108112
109113
- if: env.TYPE == 'coverage'
110-
name: Run PHPUnit w/ coverage
111-
run: php tests/phpunit/phpunit.php -c extensions/BootstrapComponents/ --testsuite bootstrap-components-unit --coverage-clover coverage.clover
114+
name: '[TEST] Run PHPUnit (unified runner, --group mediawiki-databaseless, coverage)'
115+
run: |
116+
(composer phpunit:config 2>/dev/null || true)
117+
vendor/bin/phpunit -c extensions/BootstrapComponents/phpunit.xml.dist \
118+
--bootstrap tests/phpunit/bootstrap.php \
119+
--group mediawiki-databaseless \
120+
--coverage-clover coverage.clover
112121
113122
- if: env.TYPE == 'coverage'
114123
name: upload coverage report

‎.github/workflows/installWiki.sh‎

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,10 +4,9 @@ MW_BRANCH=$1
44
EXTENSION_NAME=$2
55

66
## install core
7-
wget https://github.com/wikimedia/mediawiki/archive/${MW_BRANCH}.tar.gz -nv
8-
9-
tar -zxf $MW_BRANCH.tar.gz
10-
mv mediawiki-$MW_BRANCH mediawiki
7+
# [TEST BRANCH] git clone instead of tarball — MW master needs
8+
# phpunit.xml.template which is export-ignored from the archive.
9+
git clone --depth 1 --branch "$MW_BRANCH" https://github.com/wikimedia/mediawiki.git mediawiki
1110
cd $MW_ROOT
1211

1312
composer install

0 commit comments

Comments
 (0)