Skip to content

CI: switch the install script to git clone#91

Merged
malberts merged 3 commits into
masterfrom
ci/install-modernize
Jun 13, 2026
Merged

CI: switch the install script to git clone#91
malberts merged 3 commits into
masterfrom
ci/install-modernize

Conversation

@malberts

@malberts malberts commented Jun 13, 2026

Copy link
Copy Markdown
Contributor

Preventive plus cleanup. Originally just the install-script bitrot fix, expanded in chat to also bring the matrix and PHPUnit invocation in line with Chameleon and BootstrapComponents.

Switch the install script to git clone

Wikimedia recently converted older MediaWiki release refs (REL1_39 through REL1_42, plus older extension/skin branches) from branches to tags. The original branch refs still exist for now, so the same names resolve as both a branch AND a tag. GitHub's archive endpoint can no longer disambiguate the bare archive/<name>.tar.gz URL form in that state, and returns an HTTP 300 Multiple Choices with a 105-byte body:

the given path has multiple possibilities: #Git::Ref:..., #Git::Ref:...

Switching installWiki.sh to git clone --depth 1 --branch <name> resolves whichever ref form exists and is robust to whatever Wikimedia does with the refs next.

Drop the redundant wget for phpunit.xml.template

The new-runner code path was fetching phpunit.xml.template from raw.githubusercontent.com because MediaWiki marks the file export-ignore in .gitattributes, which excludes it from git archive output (and therefore from GitHub's archive/<ref>.tar.gz tarball endpoint). 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 becomes dead code. This realises the inline TODO already noting "remove this once installWiki.sh switches to git clone".

Bump the cache key

Existing wget-era cache entries lack phpunit.xml.template because they were populated from the archive tarball. Without a key bump, on every cache hit after merge the file would be absent and composer phpunit:config would fail. Bump to -v2 so the next run produces a fresh entry from the git clone path with the file included.

Add MediaWiki 1.46 and consolidate the PHPUnit step

MediaWiki 1.46 removed the tests/phpunit/phpunit.php legacy entry point in favour of vendor/bin/phpunit with phpunit.xml generated by composer phpunit:config. Consolidate the previously-split "MW < master" and "MW master" PHPUnit steps into a single step that detects which runner is available at the file-existence level, matching the pattern already in use in Chameleon and BootstrapComponents.

Add REL1_46 to the matrix as a non-experimental row and drop the duplicate master / PHP 8.4 row in favour of REL1_46 / PHP 8.4 plus master / PHP 8.5.

malberts and others added 2 commits June 13, 2026 12:49
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/<name>.tar.gz` URL form now returns HTTP 300 Multiple
Choices for those names instead of a tarball:

  the given path has multiple possibilities:
    #<Git::Ref:...>, #<Git::Ref:...>

The master 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 <name>` resolves either ref form transparently and is robust
to whatever Wikimedia does with the refs next.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
MediaWiki marks phpunit.xml.template with `export-ignore` in
`.gitattributes`, which excludes it from `git archive` output (and
therefore from GitHub's `archive/<ref>.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 <noreply@anthropic.com>
@malberts malberts force-pushed the ci/install-modernize branch from 2c31736 to 34e81f5 Compare June 13, 2026 11:02
@malberts malberts marked this pull request as ready for review June 13, 2026 11:04
MediaWiki 1.46 removed the tests/phpunit/phpunit.php legacy entry point
in favour of vendor/bin/phpunit with phpunit.xml generated by composer
phpunit:config. Consolidate the previously-split "MW < master" and
"MW master" PHPUnit steps into a single step that detects which runner
is available at the file-existence level, matching the pattern already
in use in Chameleon and BootstrapComponents.

Add REL1_46 to the matrix as a non-experimental row (it now passes
with the new runner) and drop the duplicate master/PHP 8.4 row in
favour of REL1_46/PHP 8.4 + master/PHP 8.5.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
@malberts malberts merged commit 1228e0b into master Jun 13, 2026
5 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant