From fbfe859a790f266236482ece5888d7088029d74e Mon Sep 17 00:00:00 2001 From: Jeroen De Dauw Date: Thu, 28 Nov 2024 22:31:29 +0100 Subject: [PATCH 1/6] Fix WB submodules and test with modern MW --- .github/workflows/ci.yml | 30 +++++++++++++-------------- .github/workflows/installMediaWiki.sh | 6 ++++++ 2 files changed, 20 insertions(+), 16 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 2572f25..f047792 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -23,6 +23,12 @@ jobs: php: '8.2' - mw: 'REL1_40' php: '8.2' + - mw: 'REL1_41' + php: '8.2' + - mw: 'REL1_42' + php: '8.2' + - mw: 'REL1_43' + php: '8.2' runs-on: ubuntu-latest @@ -46,7 +52,7 @@ jobs: mediawiki !mediawiki/extensions/ !mediawiki/vendor/ - key: mw_${{ matrix.mw }}-php${{ matrix.php }}_v3 + key: mw_${{ matrix.mw }}-php${{ matrix.php }}_v5 - name: Cache Composer cache uses: actions/cache@v4 @@ -96,10 +102,8 @@ jobs: strategy: matrix: include: - - mw: 'REL1_37' - php: '8.0' - - mw: 'REL1_38' - php: '8.1' + - mw: 'REL1_39' + php: '8.2' runs-on: ubuntu-latest @@ -123,7 +127,7 @@ jobs: mediawiki mediawiki/extensions/ mediawiki/vendor/ - key: mw_${{ matrix.mw }}-php${{ matrix.php }}_v3 + key: mw_${{ matrix.mw }}-php${{ matrix.php }}_v5 - name: Cache Composer cache uses: actions/cache@v4 @@ -164,10 +168,8 @@ jobs: strategy: matrix: include: - - mw: 'REL1_37' - php: '8.0' - - mw: 'REL1_38' - php: '8.1' + - mw: 'REL1_39' + php: '8.2' runs-on: ubuntu-latest @@ -191,7 +193,7 @@ jobs: mediawiki mediawiki/extensions/ mediawiki/vendor/ - key: mw_${{ matrix.mw }}-php${{ matrix.php }}_v3 + key: mw_${{ matrix.mw }}-php${{ matrix.php }}_v5 - name: Cache Composer cache uses: actions/cache@v4 @@ -232,10 +234,6 @@ jobs: strategy: matrix: include: - - mw: 'REL1_37' - php: '8.0' - - mw: 'REL1_38' - php: '8.1' - mw: 'REL1_39' php: '8.2' @@ -267,7 +265,7 @@ jobs: uses: actions/cache@v4 with: path: ~/.composer/cache - key: mw_${{ matrix.mw }}-php${{ matrix.php }}_v3 + key: mw_${{ matrix.mw }}-php${{ matrix.php }}_v5 - name: Install MediaWiki if: steps.cache-mediawiki.outputs.cache-hit != 'true' diff --git a/.github/workflows/installMediaWiki.sh b/.github/workflows/installMediaWiki.sh index d392562..85c8367 100644 --- a/.github/workflows/installMediaWiki.sh +++ b/.github/workflows/installMediaWiki.sh @@ -41,3 +41,9 @@ EOT cd extensions git clone https://gerrit.wikimedia.org/r/mediawiki/extensions/Wikibase --branch=$MW_BRANCH --recurse-submodules -j8 +cd Wikibase +git submodule set-url view/lib/wikibase-serialization https://github.com/wmde/WikibaseSerializationJavaScript.git +git submodule set-url view/lib/wikibase-data-values https://github.com/wmde/DataValuesJavaScript.git +git submodule set-url view/lib/wikibase-data-model https://github.com/wmde/WikibaseDataModelJavaScript.git +git submodule sync && git submodule init && git submodule update --recursive +cd .. From eded69d30082268c537c906cf54dc3a30b542bc3 Mon Sep 17 00:00:00 2001 From: Morne Alberts Date: Fri, 29 Nov 2024 00:12:01 +0200 Subject: [PATCH 2/6] Checkout branch --- .github/workflows/installMediaWiki.sh | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/.github/workflows/installMediaWiki.sh b/.github/workflows/installMediaWiki.sh index 85c8367..ce941b7 100644 --- a/.github/workflows/installMediaWiki.sh +++ b/.github/workflows/installMediaWiki.sh @@ -1,9 +1,11 @@ #! /bin/bash +set -e + MW_BRANCH=$1 EXTENSION_NAME=$2 -wget https://github.com/wikimedia/mediawiki/archive/$MW_BRANCH.tar.gz -nv +wget https://github.com/wikimedia/mediawiki/archive/refs/heads/$MW_BRANCH.tar.gz -nv tar -zxf $MW_BRANCH.tar.gz mv mediawiki-$MW_BRANCH mediawiki From 86f8602cf5a38090794150417d635b0f3c84bdc4 Mon Sep 17 00:00:00 2001 From: Morne Alberts Date: Fri, 29 Nov 2024 00:16:46 +0200 Subject: [PATCH 3/6] Remove recurse --- .github/workflows/installMediaWiki.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/installMediaWiki.sh b/.github/workflows/installMediaWiki.sh index ce941b7..d923b9e 100644 --- a/.github/workflows/installMediaWiki.sh +++ b/.github/workflows/installMediaWiki.sh @@ -41,7 +41,7 @@ cat <> composer.local.json EOT cd extensions -git clone https://gerrit.wikimedia.org/r/mediawiki/extensions/Wikibase --branch=$MW_BRANCH --recurse-submodules -j8 +git clone https://gerrit.wikimedia.org/r/mediawiki/extensions/Wikibase --branch=$MW_BRANCH -j8 cd Wikibase git submodule set-url view/lib/wikibase-serialization https://github.com/wmde/WikibaseSerializationJavaScript.git From 83ea1f571a4958f109dc11599adaebed32b05cdf Mon Sep 17 00:00:00 2001 From: Jeroen De Dauw Date: Fri, 29 Nov 2024 14:13:52 +0100 Subject: [PATCH 4/6] Update ci.yml --- .github/workflows/ci.yml | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index f047792..37e4821 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -5,7 +5,7 @@ on: pull_request: jobs: - test: + test:https://github.com/ProfessionalWiki/WikibaseExport/edit/fixci/.github/workflows/ci.yml?pr=%2FProfessionalWiki%2FWikibaseExport%2Fpull%2F182 name: "PHPUnit: MW ${{ matrix.mw }}, PHP ${{ matrix.php }}" strategy: @@ -23,12 +23,6 @@ jobs: php: '8.2' - mw: 'REL1_40' php: '8.2' - - mw: 'REL1_41' - php: '8.2' - - mw: 'REL1_42' - php: '8.2' - - mw: 'REL1_43' - php: '8.2' runs-on: ubuntu-latest From 9d5c24e97f1214256bf7ea29f3c79d3dc88a46e9 Mon Sep 17 00:00:00 2001 From: Morne Alberts Date: Fri, 29 Nov 2024 16:23:59 +0200 Subject: [PATCH 5/6] Update ci.yml --- .github/workflows/ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 37e4821..3c16700 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -5,7 +5,7 @@ on: pull_request: jobs: - test:https://github.com/ProfessionalWiki/WikibaseExport/edit/fixci/.github/workflows/ci.yml?pr=%2FProfessionalWiki%2FWikibaseExport%2Fpull%2F182 + test: name: "PHPUnit: MW ${{ matrix.mw }}, PHP ${{ matrix.php }}" strategy: From 7735d71c660dd9701cb98a2f099cda7abe3bf639 Mon Sep 17 00:00:00 2001 From: Morne Alberts Date: Fri, 29 Nov 2024 16:37:41 +0200 Subject: [PATCH 6/6] Revert PHPStan and Psalm versions --- .github/workflows/ci.yml | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 3c16700..e391907 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -96,8 +96,10 @@ jobs: strategy: matrix: include: - - mw: 'REL1_39' - php: '8.2' + - mw: 'REL1_37' + php: '8.0' + - mw: 'REL1_38' + php: '8.1' runs-on: ubuntu-latest @@ -162,8 +164,10 @@ jobs: strategy: matrix: include: - - mw: 'REL1_39' - php: '8.2' + - mw: 'REL1_37' + php: '8.0' + - mw: 'REL1_38' + php: '8.1' runs-on: ubuntu-latest