From f5d7673baaed1571e0287d243eb447b6696e66e2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Michael=20Vo=C5=99=C3=AD=C5=A1ek?= Date: Sat, 16 Dec 2023 15:48:10 +0100 Subject: [PATCH] Test lowest deps in CI (#9265) * fix "composer update" as there is no composer.lock * fail-fast: false * Test lowest deps in CI * add "--fail-on-warning --fail-on-risky" to phpunit to CI * fix lowest phpunit dep for PHP 8.1+ * fix Rcmail_RcmailSendmail::test_email_input_format --------- Co-authored-by: Aleksander Machniak --- .github/workflows/browser_tests.yml | 4 ++-- .github/workflows/tests.yml | 28 ++++++++++++++++++++-------- INSTALL | 2 +- Makefile | 2 +- UPGRADING | 2 +- composer.json-dist | 4 ++-- 6 files changed, 27 insertions(+), 15 deletions(-) diff --git a/.github/workflows/browser_tests.yml b/.github/workflows/browser_tests.yml index 9503b711d43..724a4cb868b 100644 --- a/.github/workflows/browser_tests.yml +++ b/.github/workflows/browser_tests.yml @@ -13,7 +13,7 @@ jobs: if: "!contains(github.event.head_commit.message, '[skip ci]') && !contains(github.event.head_commit.message, '[ci skip]')" strategy: - fail-fast: true + fail-fast: false matrix: php: ["8.1"] @@ -49,7 +49,7 @@ jobs: composer require "laravel/dusk:^7.9" --no-update - name: Install dependencies - run: composer install --prefer-dist --no-interaction --no-progress + run: composer update --prefer-dist --no-interaction --no-progress - name: Roundcube configuration run: cp .github/config-test.inc.php config/config-test.inc.php diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index e84fa11d938..a06187ea4a5 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -13,7 +13,7 @@ jobs: if: "!contains(github.event.head_commit.message, '[skip ci]') && !contains(github.event.head_commit.message, '[ci skip]')" strategy: - fail-fast: true + fail-fast: false matrix: php: ["7.3", "7.4", "8.0", "8.1", "8.2", "8.3"] @@ -44,13 +44,13 @@ jobs: composer require "kolab/net_ldap3:~1.1.4" --no-update - name: Install dependencies - run: composer install --prefer-dist --no-interaction --no-progress + run: composer update --prefer-dist --no-interaction --no-progress - name: Roundcube configuration run: cp .github/config-test.inc.php config/config-test.inc.php - - name: Execute tests - run: vendor/bin/phpunit -c tests/phpunit.xml + - name: Execute tests (highest) + run: vendor/bin/phpunit -c tests/phpunit.xml --fail-on-warning --fail-on-risky - name: Upload artifacts uses: actions/upload-artifact@master @@ -59,12 +59,18 @@ jobs: name: Logs path: logs/errors.log + - name: Downgrade dependencies + run: composer update --prefer-dist --prefer-stable --prefer-lowest --no-interaction --no-progress --optimize-autoloader + + - name: Execute tests (lowest) + run: vendor/bin/phpunit -c tests/phpunit.xml --fail-on-warning --fail-on-risky + tests_windows: runs-on: windows-latest if: "!contains(github.event.head_commit.message, '[skip ci]') && !contains(github.event.head_commit.message, '[ci skip]')" strategy: - fail-fast: true + fail-fast: false matrix: php: ["7.3", "7.4", "8.0", "8.1", "8.2", "8.3"] @@ -89,10 +95,16 @@ jobs: composer require "kolab/net_ldap3:~1.1.4" --no-update - name: Install dependencies - run: composer install --prefer-dist --no-interaction --no-progress + run: composer update --prefer-dist --no-interaction --no-progress - name: Roundcube configuration run: cp .github/config-test.inc.php config/config-test.inc.php - - name: Execute tests - run: vendor/bin/phpunit -c tests/phpunit.xml + - name: Execute tests (highest) + run: vendor/bin/phpunit -c tests/phpunit.xml --fail-on-warning --fail-on-risky + + - name: Downgrade dependencies + run: composer update --prefer-dist --prefer-stable --prefer-lowest --no-interaction --no-progress --optimize-autoloader + + - name: Execute tests (lowest) + run: vendor/bin/phpunit -c tests/phpunit.xml --fail-on-warning --fail-on-risky diff --git a/INSTALL b/INSTALL index d8a1b1cb97f..bb8f65af1be 100644 --- a/INSTALL +++ b/INSTALL @@ -44,7 +44,7 @@ INSTALLATION - if you want to use LDAP address books, enable the LDAP libraries in your composer.json file by moving the items from "suggest" to the "require" section (remove the explanation texts after the version!). - - run `php composer.phar install --no-dev` + - run `php composer.phar update --no-dev` 2.2. Install Javascript dependencies by executing `bin/install-jsdeps.sh` script. 3. Make sure that the following directories (and the files within) are writable by the webserver diff --git a/Makefile b/Makefile index b9658552ea7..7ba97ac1286 100644 --- a/Makefile +++ b/Makefile @@ -23,7 +23,7 @@ complete: roundcubemail-git (cd roundcubemail-$(VERSION); php /tmp/composer.phar require "kolab/net_ldap3:~1.1.4" --no-update --no-install) (cd roundcubemail-$(VERSION); php /tmp/composer.phar config --unset suggest.kolab/net_ldap3) (cd roundcubemail-$(VERSION); php /tmp/composer.phar config --unset require-dev) - (cd roundcubemail-$(VERSION); php /tmp/composer.phar install --prefer-dist --no-dev --no-interaction) + (cd roundcubemail-$(VERSION); php /tmp/composer.phar update --prefer-dist --no-dev --no-interaction) (cd roundcubemail-$(VERSION); php /tmp/composer.phar config --unset platform) (cd roundcubemail-$(VERSION); bin/install-jsdeps.sh --force) (cd roundcubemail-$(VERSION); bin/jsshrink.sh program/js/publickey.js; bin/jsshrink.sh plugins/managesieve/codemirror/lib/codemirror.js) diff --git a/UPGRADING b/UPGRADING index cf3aec2fa82..d7129a2bb3b 100644 --- a/UPGRADING +++ b/UPGRADING @@ -56,7 +56,7 @@ it on a unix system, you need to do the following operations by hand: - if you want to use LDAP address books, enable the LDAP libraries in your composer.json file by moving the items from "suggest" to the "require" section (remove the explanation texts after the version!). - - run `php composer.phar install --no-dev`. + - run `php composer.phar update --no-dev`. 4c. If you use git sources or the release package without dependencies update javascript dependencies by executing `bin/install-jsdeps.sh` script. 4d. If you use git sources, compile css files for the Elastic skin as described diff --git a/composer.json-dist b/composer.json-dist index aa23b690180..5315a97c2c2 100644 --- a/composer.json-dist +++ b/composer.json-dist @@ -9,7 +9,7 @@ "masterminds/html5": "~2.8.0", "pear/auth_sasl": "~1.1.0", "pear/crypt_gpg": "~1.6.3", - "pear/mail_mime": "~1.10.0", + "pear/mail_mime": "~1.10.8", "pear/net_sieve": "~1.4.5", "pear/net_smtp": "~1.10.0", "pear/pear-core-minimal": "~1.10.1", @@ -19,7 +19,7 @@ "require-dev": { "ergebnis/composer-normalize": "^2.13", "friendsofphp/php-cs-fixer": "^3.0", - "phpunit/phpunit": "^9" + "phpunit/phpunit": "^9.6" }, "suggest": { "bjeavons/zxcvbn-php": "^1.0 required for Zxcvbn password strength driver",