From 01c52c057d6b3cf53f4a9614142cb85cff27f1d6 Mon Sep 17 00:00:00 2001 From: Morne Alberts Date: Sat, 13 Jun 2026 12:32:50 +0200 Subject: [PATCH 1/2] CI: clone MediaWiki and Scribunto 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: #, # Master's current matrix only tests 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 matches the clone style already in use immediately below for Vector and Scribunto. Co-Authored-By: Claude Opus 4.7 --- .github/workflows/installWiki.sh | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) diff --git a/.github/workflows/installWiki.sh b/.github/workflows/installWiki.sh index 62b6662..aad1189 100644 --- a/.github/workflows/installWiki.sh +++ b/.github/workflows/installWiki.sh @@ -4,10 +4,7 @@ MW_BRANCH=$1 EXTENSION_NAME=$2 ## install core -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 $MW_ROOT composer install @@ -35,10 +32,8 @@ git clone --branch ${MW_BRANCH} https://github.com/wikimedia/Vector.git ## Scribunto cd ../extensions -wget https://github.com/wikimedia/mediawiki-extensions-Scribunto/archive/${MW_BRANCH}.tar.gz -tar -zxf ${MW_BRANCH}.tar.gz [[ -e Scribunto ]] && rm -rf Scribunto -mv mediawiki-extensions-Scribunto* Scribunto +git clone --depth 1 --branch ${MW_BRANCH} https://github.com/wikimedia/mediawiki-extensions-Scribunto.git Scribunto cd .. From 825bd3bee1c16f304c6b873b65739e292b474d20 Mon Sep 17 00:00:00 2001 From: Morne Alberts Date: Sat, 13 Jun 2026 12:32:50 +0200 Subject: [PATCH 2/2] CI: drop redundant wget for phpunit.xml.template MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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. `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 from both PHPUnit invocations. Bump the cache key so existing wget-era cache entries (which lack `phpunit.xml.template` because they were populated from the archive tarball) do not satisfy the new code path, which would otherwise fail with "phpunit.xml.template not found" on every cache hit until eviction. 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 b3d5477..f8d813b 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -66,7 +66,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@v5 @@ -101,9 +101,6 @@ jobs: php tests/phpunit/phpunit.php -c extensions/BootstrapComponents/ --testsuite bootstrap-components-unit else # MW 1.46 and later - 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 # Temporary integration-test workaround; see issue #98. MEDIAWIKI_HAS_INTEGRATION_TESTS=1 vendor/bin/phpunit -c phpunit.xml extensions/BootstrapComponents/tests/phpunit/Unit @@ -116,9 +113,6 @@ jobs: php tests/phpunit/phpunit.php -c extensions/BootstrapComponents/ --testsuite bootstrap-components-unit --coverage-clover coverage.clover else # MW 1.46 and later - 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 # Temporary integration-test workaround; see issue #98. MEDIAWIKI_HAS_INTEGRATION_TESTS=1 vendor/bin/phpunit -c phpunit.xml extensions/BootstrapComponents/tests/phpunit/Unit --coverage-clover coverage.clover