Skip to content
Draft
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
16 changes: 13 additions & 3 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,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 Down Expand Up @@ -102,14 +102,24 @@ jobs:
working-directory: ~
run: bash EarlyCopy/.github/workflows/uploadImages.sh

- if: env.TYPE != 'coverage'
- if: env.TYPE != 'coverage' && matrix.mw != 'master'
name: Run PHPUnit w/o coverage
run: php tests/phpunit/phpunit.php -c extensions/BootstrapComponents/ --testsuite bootstrap-components-unit

- if: env.TYPE == 'coverage'
- if: env.TYPE == 'coverage' && matrix.mw != 'master'
name: Run PHPUnit w/ coverage
run: php tests/phpunit/phpunit.php -c extensions/BootstrapComponents/ --testsuite bootstrap-components-unit --coverage-clover coverage.clover

- if: matrix.mw == 'master'
name: Run PHPUnit (MW master)
run: |
# MediaWiki master (≥ 1.46) removed tests/phpunit/phpunit.php; the
# supported runner is vendor/bin/phpunit against the config
# generated by `composer phpunit:config` from phpunit.xml.template
# (which installWiki.sh's git clone ships).
composer phpunit:config
vendor/bin/phpunit -c extensions/BootstrapComponents/phpunit.xml.dist --bootstrap tests/phpunit/bootstrap.php --testsuite bootstrap-components-unit

- if: env.TYPE == 'coverage'
name: upload coverage report
working-directory: ~
Expand Down
10 changes: 6 additions & 4 deletions .github/workflows/installWiki.sh
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,12 @@ MW_BRANCH=$1
EXTENSION_NAME=$2

## install core
wget https://github.com/wikimedia/mediawiki/archive/${MW_BRANCH}.tar.gz -nv

tar -zxf $MW_BRANCH.tar.gz
mv mediawiki-$MW_BRANCH mediawiki
# Clone rather than fetch the tarball: MW's .gitattributes marks
# phpunit.xml.template as `export-ignore`, so it's absent from the
# archive that GitHub serves. `composer phpunit:config` on MW master
# needs that file; `git clone` ships it. ~40MB extra in cached
# `.git/`, no measurable time difference.
git clone --depth 1 --branch "$MW_BRANCH" https://github.com/wikimedia/mediawiki.git mediawiki
cd $MW_ROOT

composer install
Expand Down
Loading