From c748c30a9248564fa3a88c3237f72a0d709c0171 Mon Sep 17 00:00:00 2001 From: Morne Alberts Date: Sat, 13 Jun 2026 12:49:13 +0200 Subject: [PATCH 1/2] CI: clone MediaWiki with git instead of wget+tar GitHub recently converted older MediaWiki release refs (REL1_39 through REL1_42, plus all old extension/skin branches down to REL1_20) from branches to tags, leaving both refs in place under the same name. The bare `archive/.tar.gz` URL form now returns HTTP 300 Multiple Choices for those names instead of a tarball: the given path has multiple possibilities: #, # The matrix only covers REL1_43+ so this isn't surfacing today, but the bare URL form is a latent hazard as future versions move through the same conversion. Switching to `git clone --depth 1 --branch ` resolves either ref form transparently and is robust to whatever Wikimedia does with the refs next. Co-Authored-By: Claude Opus 4.7 --- .github/workflows/installWiki.sh | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/.github/workflows/installWiki.sh b/.github/workflows/installWiki.sh index 4439067..bc3e4ce 100644 --- a/.github/workflows/installWiki.sh +++ b/.github/workflows/installWiki.sh @@ -3,10 +3,7 @@ MW_BRANCH=$1 EXTENSION_NAME=$2 -wget https://github.com/wikimedia/mediawiki/archive/$MW_BRANCH.tar.gz -nv - -tar -zxf $MW_BRANCH.tar.gz -mv mediawiki-$MW_BRANCH mediawiki +git clone --depth 1 --branch ${MW_BRANCH} https://github.com/wikimedia/mediawiki.git mediawiki cd mediawiki From d7d5eec78e3d2871234ed14ae3fc99ea76258e8c Mon Sep 17 00:00:00 2001 From: Morne Alberts Date: Sat, 13 Jun 2026 12:49:40 +0200 Subject: [PATCH 2/2] CI: drop redundant wget for phpunit.xml.template MediaWiki marks phpunit.xml.template with `export-ignore` in `.gitattributes`, which excludes it from `git archive` output (and therefore from GitHub's `archive/.tar.gz` tarball endpoint). That's why the new-runner code path had to fetch it separately, and why the existing inline TODO anticipated this cleanup. `git clone` does not honour `export-ignore`; the file is in the working tree after a normal checkout. With installWiki.sh now using `git clone`, the separate wget for the template becomes dead code. Drop it. Bump the cache key to invalidate existing wget-era entries (which lack `phpunit.xml.template` because they were populated from the archive tarball); without the bump, on every cache hit the file would be absent and `composer phpunit:config` would fail. Co-Authored-By: Claude Opus 4.7 --- .github/workflows/ci.yml | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index f4e7ac3..c7157f1 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -53,7 +53,7 @@ jobs: mediawiki !mediawiki/extensions/ !mediawiki/vendor/ - key: mw_${{ matrix.mw }}-php${{ matrix.php }} + key: mw_${{ matrix.mw }}-php${{ matrix.php }}-v2 - name: Cache Composer cache uses: actions/cache@v4 @@ -90,11 +90,5 @@ jobs: - name: Run PHPUnit (MW master) if: matrix.mw == 'master' run: | - # TODO: phpunit.xml.template is export-ignored from GitHub's tarball - # archive, so we fetch it separately. Remove this once installWiki.sh - # switches to `git clone`, or MW drops the export-ignore. - if [ ! -f phpunit.xml.template ]; then - wget -q -O phpunit.xml.template "https://raw.githubusercontent.com/wikimedia/mediawiki/${{ matrix.mw }}/phpunit.xml.template" - fi composer phpunit:config vendor/bin/phpunit --group extension-bootstrap