* Allow to inject composer arguments into testing scripts
* Run unit tests with PHP v8.5, too
* Run browser tests with PHP 8.5, too
* Depend on php-cs-fixer v3.8, which supports PHP v8.4
* Run code style checks in CI on PHP v8.4
* Check for vars being set and not null before using them as array keys
* Use generic tag name in container image build script
The script is meant for locally building images (the CI workflow runs
other code), so we now use localhost/ as namespace.
* Check that variable is usable before using it as array key
This includes proper type declarations for the method arguments and its return value.
* Ensure that the input to chr() is between 0 and 255.
* Require guzzle v7.10.0, which supports PHP 8.5
* Update phpunit a little to decide when to fail on deprecations
PHPUnit 10.5.47 and later know the flag `--do-not-fail-on-deprecation`, which allows us to make it not exit with code 1
in case of deprecations on the second run of the script. That second run uses the lowest valid dependencies, which might
contain deprecations when used with newer versions of PHP, but still are acceptable versions, and should not make our
tests fail.
* Run message rendering tests with PHP v8.4 and v8.5, too
* Check explicitly for null-ness
0 would be a valid value here.
* Replace chr() by mb_chr() and remove the workaround
* Revert "Get rid of phpstan/phpstan-strict-rules"
This reverts commit ff59ade31a.
* drop phpstan baseline
* fix foreach phpstan issue
* adjust for rebase
* fix method call case
* ignore one phpstan error even after isset
* Install requited locale in container image
One of the IMAP tests curiuosly ran successfully on Github-runners, but
failed locally. This is the pre-condition for a fix.
* Explicitly require mandatory locale for test
This test works only if executed with LC_COLLATE=en_US
* Schedule to rebuild testrunner image each week
* More ignore-patterns in eslint config
So we don't have to specify them on the command line when we check
codestyle locally.
* Test setup for local and CI using containers
It uses standalone containers for the greenmail IMAP server and the
standalone browser.
A testrunner image is built in the CI (for `linux/amd64` only, because
Github doesn't support multi-platform building on their default
runners and we don't have our own.)
This setup helps to run the tests (reproduceably) also locally.
Previously, on my machine, they produced varying results.
It also reduces the dependencies for running the browser test.
Local execution only depends on `docker compose`, no other tools
(previously it required `sudo`, `java`, and some more.)
The previous solution should still work, if you want it.
The scripts are stored in a directory called `.ci` to hide them a little
and avoid confusion with the container images from the
`roundcubemail-docker` repo.
* Fix UI tests by waiting for element before using it
This only was a flaky problem only occurring sometimes.
* Force a new IMAP connection in plugin tests, too
In other code the initial connection is forced. Doing this here, too,
fixes occasional problems with lost imap connections.
* Make waiting for zipfile's content more robust
* CI: Run tests from script on Windows, too
* CI: Do start local chrome if no connect URL is given
* Move compose.yml to tests/
This way it's less easy mistaken as usable for running Roundcubemail in
production.
* Move compose.yml to .ci/
* Check plugins composer.json using CI
* Add "require-dev" and "config.allow-plugins" to plugins
* fix composer.json format - rm invalid email
* fix composer.json format - fix ext require
* fix composer.json format - fix plugin name
* tmp
* Revert "tmp"
* fix ext in ext install
* disable plugin in plugin install until Roundcube is fully autoloadable
* fix composer.json format - fix non-canonical license name
* Revert "Add "require-dev" and "config.allow-plugins" to plugins"
* no composer install for plugins needed
* Revert "fix ext in ext install"
* add standard "Test" suffix to phpunit files
* rm unneeded "suffix" in phpunit config
* simplify phpunit config
* fix default "xhtml" doctype in unit testing
* fix test_format_date test to not rely on other tests
* even more phpunit config simplify
* stricter/unify phpunit params for E2E tests
* run E2E tests on maximal php version too with lowest deps
* "repositories" in bundled plugins are useless as for root package only
* add/unify missing plugin test
* Do not analyse symlinked public_html files
* revert: not needed for PHP CS Fixer
* revert: PHPStan excludePaths is evaluated after symlink is resolved
* workaround
* update/dedup baseline
* add comment
* 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>
* Run unit tests in CI on Windows too
* Install::test_check_mime_extensions() has no mime.types on Windows
* Fix sqlite test DB path and unlink for Windows
* Fix rcube::exec() testing for Windows
* Prevent git EOL conversion for tests/
* Fix test_rtf2text test for text with CRLF
* run E2E tests on one php version only