diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 8787aed..f4e7ac3 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -80,5 +80,21 @@ jobs: - name: Composer update run: composer update - - name: Run PHPUnit + # "master" currently tracks MW >= 1.46, where tests/phpunit/phpunit.php + # was removed. Once REL1_46 lands in the matrix, it needs the master + # invocation below as well. + - name: Run PHPUnit (MW < master) + if: matrix.mw != 'master' run: php tests/phpunit/phpunit.php -c extensions/Bootstrap/ + + - 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