2024-05-25 06:19:49 +00:00
|
|
|
name: PHP tests
|
2023-08-25 21:39:37 +00:00
|
|
|
|
|
|
|
on:
|
2024-05-25 06:19:49 +00:00
|
|
|
workflow_dispatch:
|
2023-08-25 21:39:37 +00:00
|
|
|
|
|
|
|
jobs:
|
|
|
|
test:
|
2024-05-25 06:19:49 +00:00
|
|
|
name: "PHP tests: MW ${{ matrix.mw }}, PHP ${{ matrix.php }}"
|
2023-08-25 21:39:37 +00:00
|
|
|
continue-on-error: ${{ matrix.experimental }}
|
|
|
|
|
|
|
|
strategy:
|
|
|
|
matrix:
|
|
|
|
include:
|
|
|
|
- mw: 'REL1_39'
|
|
|
|
php: 8.1
|
|
|
|
experimental: false
|
2024-09-04 19:41:18 +00:00
|
|
|
- mw: 'REL1_41'
|
2023-08-25 21:39:37 +00:00
|
|
|
php: 8.1
|
|
|
|
experimental: true
|
2024-09-04 19:41:18 +00:00
|
|
|
- mw: 'REL1_42'
|
2024-01-26 23:14:08 +00:00
|
|
|
php: 8.1
|
|
|
|
experimental: true
|
2024-01-27 01:51:00 +00:00
|
|
|
#- mw: 'master'
|
|
|
|
# php: 8.1
|
|
|
|
# experimental: true
|
2023-08-25 21:39:37 +00:00
|
|
|
|
|
|
|
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
|
2024-01-25 07:55:37 +00:00
|
|
|
uses: actions/cache@v4
|
2023-08-25 21:39:37 +00:00
|
|
|
with:
|
|
|
|
path: |
|
|
|
|
mediawiki
|
|
|
|
!mediawiki/extensions/
|
|
|
|
!mediawiki/vendor/
|
|
|
|
key: mw_${{ matrix.mw }}-php${{ matrix.php }}-v20
|
|
|
|
|
|
|
|
- name: Cache Composer cache
|
2024-01-25 07:55:37 +00:00
|
|
|
uses: actions/cache@v4
|
2023-08-25 21:39:37 +00:00
|
|
|
with:
|
|
|
|
path: ~/.composer/cache
|
|
|
|
key: composer-php${{ matrix.php }}
|
|
|
|
|
2023-09-05 05:44:13 +00:00
|
|
|
- uses: actions/checkout@v4
|
2023-08-25 21:39:37 +00:00
|
|
|
with:
|
|
|
|
path: EarlyCopy
|
|
|
|
|
|
|
|
- name: Install MediaWiki
|
|
|
|
if: steps.cache-mediawiki.outputs.cache-hit != 'true'
|
|
|
|
working-directory: ~
|
|
|
|
run: bash EarlyCopy/.github/workflows/installWiki.sh ${{ matrix.mw }}
|
|
|
|
|
2023-09-05 05:44:13 +00:00
|
|
|
- uses: actions/checkout@v4
|
2023-08-25 21:39:37 +00:00
|
|
|
with:
|
|
|
|
path: mediawiki/skins/Citizen
|
|
|
|
|
|
|
|
- name: Composer update
|
|
|
|
run: composer update
|
|
|
|
|
|
|
|
- name: Run PHPUnit
|
|
|
|
run: composer phpunit:entrypoint -- --group Citizen
|