Support the MediaWiki 1.46 PHPUnit test runner#77
Merged
Conversation
MediaWiki 1.46 removes tests/phpunit/phpunit.php, so the CI PHPUnit steps failed on the master matrix row with "Could not open input file: tests/phpunit/phpunit.php". Gate both PHPUnit steps on the presence of that entrypoint: keep the existing invocation where it exists, and on newer MediaWiki generate the runner config from the core template (composer phpunit:config) and invoke vendor/bin/phpunit directly. Add a REL1_46 matrix row so the new path is exercised on a stable branch as well. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
The coverage step re-ran the whole suite on every job, and the upload used the codecov bash uploader that was sunset in 2022, so it collected and uploaded nothing. No other extension in the stack gathers coverage. Run the suite once per job. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problem
MediaWiki 1.46 removes
tests/phpunit/phpunit.php. The CI PHPUnit steps call it directly, so themastermatrix row (1.46-dev) fails at the "Run PHPUnit" step:Changes
tests/phpunit/phpunit.phpexists (MW <= 1.45), keep the current invocation; on newer MediaWiki, fetch the corephpunit.xml.template, generate the runner config withcomposer phpunit:config, and runvendor/bin/phpunitagainst the extension's test directory. This mirrors the approach already used for Chameleon and BootstrapComponents.REL1_46matrix row (experimental) so the new path is exercised on a stable branch, not only onmaster.Note on coverage
Rather than repair the dead uploader, coverage is dropped for now. This keeps SimpleBatchUpload consistent with the rest of the stack, where coverage is not collected (Chameleon and FontAwesome have none; BootstrapComponents' coverage path exists but is disabled).
Switching to the maintained
codecov/codecov-actionwas considered but deferred: it requires the repository to be onboarded to Codecov with aCODECOV_TOKENsecret, and it would make this the only extension in the stack reporting coverage. Whether to (re)introduce coverage is better decided stack-wide than bolted on here.