diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 315c590..2e93354 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -27,6 +27,9 @@ jobs: - mw: 'REL1_45' php: '8.4' experimental: false + - mw: 'REL1_46' + php: '8.4' + experimental: true - mw: 'master' php: '8.5' experimental: true @@ -80,11 +83,14 @@ jobs: run: php maintenance/update.php --quick - name: Run PHPUnit - run: php tests/phpunit/phpunit.php -c extensions/SimpleBatchUpload/ - - - name: Run PHPUnit with code coverage - run: php tests/phpunit/phpunit.php -c extensions/SimpleBatchUpload/ --coverage-clover coverage.xml - - - name: Upload code coverage - run: bash <(curl -s https://codecov.io/bash) - if: github.ref == 'refs/heads/master' + run: | + if [ -f tests/phpunit/phpunit.php ]; then + php tests/phpunit/phpunit.php -c extensions/SimpleBatchUpload/ + 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 + MEDIAWIKI_HAS_INTEGRATION_TESTS=1 vendor/bin/phpunit -c phpunit.xml extensions/SimpleBatchUpload/tests/phpunit + fi