Skip to content

Commit

Permalink
Test lowest deps in CI (#9265)
Browse files Browse the repository at this point in the history
* 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 <alec@alec.pl>
  • Loading branch information
mvorisek and alecpl authored Dec 16, 2023
1 parent 1aef271 commit f5d7673
Show file tree
Hide file tree
Showing 6 changed files with 27 additions and 15 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/browser_tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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"]

Expand Down Expand Up @@ -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
Expand Down
28 changes: 20 additions & 8 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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"]

Expand Down Expand Up @@ -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
Expand All @@ -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"]

Expand All @@ -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
2 changes: 1 addition & 1 deletion INSTALL
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
2 changes: 1 addition & 1 deletion UPGRADING
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
4 changes: 2 additions & 2 deletions composer.json-dist
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand All @@ -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",
Expand Down

0 comments on commit f5d7673

Please sign in to comment.