Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
29 changes: 10 additions & 19 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,9 +24,9 @@ jobs:
- mw: 'REL1_45'
php: 8.3
experimental: false
- mw: 'master'
- mw: 'REL1_46'
php: 8.4
experimental: true
experimental: false
- mw: 'master'
php: 8.5
experimental: true
Expand All @@ -53,7 +53,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@v4
Expand All @@ -80,21 +80,12 @@ jobs:
- name: Composer update
run: composer update

# "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'
- name: Run PHPUnit
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"
if [ -f tests/phpunit/phpunit.php ]; then
php tests/phpunit/phpunit.php -c extensions/Bootstrap/
else
# MW 1.46 and later
composer phpunit:config
vendor/bin/phpunit --group extension-bootstrap
fi
composer phpunit:config
vendor/bin/phpunit --group extension-bootstrap
5 changes: 1 addition & 4 deletions .github/workflows/installWiki.sh
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,7 @@
MW_BRANCH=$1
EXTENSION_NAME=$2

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 mediawiki

Expand Down
Loading