Localisation updates from https://translatewiki.net. #150
This file contains 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
name: CI | |
on: | |
push: | |
pull_request: | |
jobs: | |
test: | |
name: "PHPUnit: MW ${{ matrix.mw }}, PHP ${{ matrix.php }}" | |
strategy: | |
matrix: | |
include: | |
- mw: 'REL1_35' | |
php: 7.4 | |
- mw: 'REL1_36' | |
php: 8.0 | |
- mw: 'REL1_37' | |
php: 8.0 | |
- mw: 'REL1_38' | |
php: 8.0 | |
- mw: 'REL1_39' | |
php: 8.0 | |
runs-on: ubuntu-latest | |
defaults: | |
run: | |
working-directory: mediawiki | |
steps: | |
- name: Setup PHP | |
uses: shivammathur/setup-php@v2 | |
with: | |
php-version: ${{ matrix.php }} | |
extensions: mbstring, intl | |
tools: composer | |
- name: Cache MediaWiki | |
id: cache-mediawiki | |
uses: actions/cache@v2 | |
with: | |
path: | | |
mediawiki | |
!mediawiki/extensions/ | |
!mediawiki/vendor/ | |
key: mw_${{ matrix.mw }}-php${{ matrix.php }}_v3 | |
- name: Cache Composer cache | |
uses: actions/cache@v2 | |
with: | |
path: ~/.composer/cache | |
key: composer-php${{ matrix.php }} | |
- uses: actions/checkout@v2 | |
with: | |
path: EarlyCopy | |
- name: Install MediaWiki | |
if: steps.cache-mediawiki.outputs.cache-hit != 'true' | |
working-directory: ~ | |
run: bash EarlyCopy/.github/workflows/installMediaWiki.sh ${{ matrix.mw }} AutomatedValues | |
- uses: actions/checkout@v2 | |
with: | |
path: mediawiki/extensions/AutomatedValues | |
- name: Composer allow-plugins | |
run: composer config --no-plugins allow-plugins.composer/installers true | |
- run: composer update | |
- name: Run update.php | |
run: php maintenance/update.php --quick | |
- name: Run PHPUnit | |
run: php tests/phpunit/phpunit.php -c extensions/AutomatedValues/ | |
if: matrix.php != 7.4 | |
- name: Run PHPUnit with code coverage | |
run: php tests/phpunit/phpunit.php -c extensions/AutomatedValues/ --coverage-clover coverage.xml | |
if: matrix.php == 7.4 | |
- name: Upload code coverage | |
run: bash <(curl -s https://codecov.io/bash) | |
if: matrix.php == 7.4 | |
PHPStan: | |
name: "PHPStan" | |
runs-on: ubuntu-latest | |
defaults: | |
run: | |
working-directory: mediawiki | |
steps: | |
- name: Setup PHP | |
uses: shivammathur/setup-php@v2 | |
with: | |
php-version: 7.4 | |
extensions: mbstring | |
tools: composer, cs2pr | |
- name: Cache MediaWiki | |
id: cache-mediawiki | |
uses: actions/cache@v2 | |
with: | |
path: | | |
mediawiki | |
mediawiki/extensions/ | |
mediawiki/vendor/ | |
key: mw_phpstan | |
- name: Cache Composer cache | |
uses: actions/cache@v2 | |
with: | |
path: ~/.composer/cache | |
key: composer_static_analysis | |
- uses: actions/checkout@v2 | |
with: | |
path: EarlyCopy | |
- name: Install MediaWiki | |
if: steps.cache-mediawiki.outputs.cache-hit != 'true' | |
working-directory: ~ | |
run: bash EarlyCopy/.github/workflows/installMediaWiki.sh REL1_39 AutomatedValues | |
- uses: actions/checkout@v2 | |
with: | |
path: mediawiki/extensions/AutomatedValues | |
- name: Composer allow-plugins | |
run: composer config --no-plugins allow-plugins.composer/installers true | |
- run: composer update | |
- name: Composer install | |
run: cd extensions/AutomatedValues && composer install --no-progress --no-interaction --prefer-dist --optimize-autoloader | |
- name: PHPStan | |
run: cd extensions/AutomatedValues && php vendor/bin/phpstan analyse --error-format=checkstyle --no-progress | cs2pr | |
Psalm: | |
name: "Psalm" | |
runs-on: ubuntu-latest | |
defaults: | |
run: | |
working-directory: mediawiki | |
steps: | |
- name: Setup PHP | |
uses: shivammathur/setup-php@v2 | |
with: | |
php-version: 7.4 | |
extensions: mbstring | |
tools: composer, cs2pr | |
- name: Cache MediaWiki | |
id: cache-mediawiki | |
uses: actions/cache@v2 | |
with: | |
path: | | |
mediawiki | |
mediawiki/extensions/ | |
mediawiki/vendor/ | |
key: mw_psalm | |
- name: Cache Composer cache | |
uses: actions/cache@v2 | |
with: | |
path: ~/.composer/cache | |
key: composer_static_analysis | |
- uses: actions/checkout@v2 | |
with: | |
path: EarlyCopy | |
- name: Install MediaWiki | |
if: steps.cache-mediawiki.outputs.cache-hit != 'true' | |
working-directory: ~ | |
run: bash EarlyCopy/.github/workflows/installMediaWiki.sh REL1_35 AutomatedValues | |
- uses: actions/checkout@v2 | |
with: | |
path: mediawiki/extensions/AutomatedValues | |
- name: Composer allow-plugins | |
run: composer config --no-plugins allow-plugins.composer/installers true | |
- run: composer update | |
- name: Composer install | |
run: cd extensions/AutomatedValues && composer install --no-progress --no-interaction --prefer-dist --optimize-autoloader | |
- name: Psalm | |
run: cd extensions/AutomatedValues && pwd && php vendor/bin/psalm --config=psalm.xml --shepherd --stats | |
code-style: | |
name: "Code style" | |
runs-on: ubuntu-latest | |
defaults: | |
run: | |
working-directory: mediawiki/extensions/AutomatedValues | |
steps: | |
- name: Setup PHP | |
uses: shivammathur/setup-php@v2 | |
with: | |
php-version: 8.0 | |
extensions: mbstring, intl, php-ast | |
tools: composer | |
- name: Cache MediaWiki | |
id: cache-mediawiki | |
uses: actions/cache@v2 | |
with: | |
path: | | |
mediawiki | |
!mediawiki/extensions/ | |
!mediawiki/vendor/ | |
key: mw_static_analysis | |
- name: Cache Composer cache | |
uses: actions/cache@v2 | |
with: | |
path: ~/.composer/cache | |
key: composer_static_analysis | |
- name: Install MediaWiki | |
if: steps.cache-mediawiki.outputs.cache-hit != 'true' | |
working-directory: ~ | |
run: curl https://gist.githubusercontent.com/JeroenDeDauw/49a3858653ff4b5be7ec849019ede06c/raw/installMediaWiki.sh | bash -s REL1_36 AutomatedValues | |
- uses: actions/checkout@v2 | |
with: | |
path: mediawiki/extensions/AutomatedValues | |
- name: Composer install | |
run: composer install --no-progress --no-interaction --prefer-dist --optimize-autoloader | |
- run: vendor/bin/phpcs -p -s | |