Skip to content

Commit d9519e2

Browse files
JeroenDeDauwclaude
andcommitted
Clone MediaWiki in CI so the 1.46+ PHPUnit config can be generated
The GitHub tarball omits export-ignored files such as phpunit.xml.template, which MediaWiki 1.46 and later need to generate their PHPUnit config. Clone the repository instead, and bump the MediaWiki cache key so stale tarball caches are rebuilt. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
1 parent f843c88 commit d9519e2

2 files changed

Lines changed: 6 additions & 7 deletions

File tree

.github/workflows/ci.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,7 @@ jobs:
6666
mediawiki
6767
!mediawiki/extensions/
6868
!mediawiki/vendor/
69-
key: mw_${{ matrix.mw }}-php${{ matrix.php }}_v1
69+
key: mw_${{ matrix.mw }}-php${{ matrix.php }}_v2
7070

7171
- name: Cache Composer cache
7272
uses: actions/cache@v4
@@ -131,7 +131,7 @@ jobs:
131131
mediawiki
132132
mediawiki/extensions/
133133
mediawiki/vendor/
134-
key: mw_${{ matrix.mw }}-php${{ matrix.php }}_v1
134+
key: mw_${{ matrix.mw }}-php${{ matrix.php }}_v2
135135

136136
- name: Cache Composer cache
137137
uses: actions/cache@v4
@@ -200,7 +200,7 @@ jobs:
200200
uses: actions/cache@v4
201201
with:
202202
path: ~/.composer/cache
203-
key: mw_${{ matrix.mw }}-php${{ matrix.php }}_v1
203+
key: mw_${{ matrix.mw }}-php${{ matrix.php }}_v2
204204

205205
- uses: actions/checkout@v4
206206
with:

.github/workflows/installMediaWiki.sh

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

6-
wget "https://github.com/wikimedia/mediawiki/archive/refs/heads/$MW_BRANCH.tar.gz" -nv
7-
8-
tar -zxf $MW_BRANCH.tar.gz
9-
mv mediawiki-$MW_BRANCH mediawiki
6+
# Clone rather than download the tarball: since MediaWiki 1.46 the test runner needs
7+
# phpunit.xml.template, which is marked export-ignore and therefore absent from tarballs.
8+
git clone --depth=1 --branch="$MW_BRANCH" https://github.com/wikimedia/mediawiki.git mediawiki
109

1110
cd mediawiki
1211

0 commit comments

Comments
 (0)