Commit Graph

108 Commits

Author SHA1 Message Date
Pablo Zmdl
16f9de14e1 WIP: reduce artifacts of testing in source code dir
Note: This breaks tests that download files
2025-06-17 14:42:52 +02:00
Aleksander Machniak
62288d89dc CI: Run static analysis on PHP 8.4 2025-04-06 15:30:04 +02:00
Aleksander Machniak
56c8533339 CI: Don't use platform.php option for PHP 8.4 anymore 2025-03-25 19:43:11 +01:00
Aleksander Machniak
c7cf2af486 CI: Enable PHP 8.4 testing 2025-03-25 19:14:45 +01:00
Pablo Zmdl
69ed9a01e2 Run phpstan also on public_html (#9824)
Now that public_html isn't just a symlink anymore but contains actual
code, that code should be checked, too.
2025-03-24 18:03:08 +01:00
Pablo Zmdl
a65dc33761 Use commit-hashes to refer to github actions, not manipulatible tags (#9819)
Dependabot will propose updates to the used versions nonetheless.

This is motivated by a recent case in which a github action was
compromised and manipulated tags to point to malicious code
<https://www.stepsecurity.io/blog/harden-runner-detection-tj-actions-changed-files-action-is-compromised>.
2025-03-23 10:34:32 +01:00
Aleksander Machniak
344260db89 Bump laravel/dusk version 2025-03-16 13:46:29 +01:00
Aleksander Machniak
9afeb0174e Use PHPStan v2 2025-03-16 13:33:15 +01:00
Aleksander Machniak
d4526968a8 Set minimum required PHP version to 8.1 (#9599) 2025-02-16 10:09:23 +01:00
Pablo Zmdl
46d25161dc Test message rendering (#9460) 2024-12-19 19:01:25 +01:00
Pablo Zmdl
983370ec89 Remove auto-reminder bot
It's more annoying that helpful currently.
2024-12-11 09:52:15 +01:00
Pablo Zmdl
d8c7c6b6d0 Bot: use permissions, not a token 2024-11-25 13:51:41 +01:00
Pablo Zmdl
27a366bb0e Limit reminder-bots to our repo 2024-11-25 13:51:13 +01:00
Pablo Zmdl
545cf4c5fc Setup a bot that notifies on manually set reminders 2024-11-20 11:22:01 +01:00
Pablo Zmdl
5a189c4d9a Setup a bot that comments on PR that is stale for 2 weeks 2024-11-20 10:23:54 +01:00
Michael Voříšek
efcdce84ba Keep phpstan strict rules testing (#9424)
* 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
2024-11-20 08:13:16 +01:00
Pablo Zmdl
d31c536f24 Fix test by make sorting independent of locale and case (#9640)
* 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
2024-09-19 06:53:20 +02:00
Pablo Zmdl
7a01966f89 CI: Call bash explicitly on MS Windows. (#9609) 2024-08-27 19:37:14 +02:00
Aleksander Machniak
ae23dad4fa CI: Stop testing PHP 8.4 - we're not ready yet 2024-08-27 19:32:10 +02:00
Aleksander Machniak
6d3140af5d CI: For PHP 8.4 use 8.1 as a platform to workaround composer issues 2024-08-21 11:39:39 +02:00
Aleksander Machniak
d69500de88 Tests: Add PHP 8.4 to the matrix 2024-08-21 11:19:42 +02:00
Pablo Zmdl
477e2bc1dd Merge pull request #9556 from roundcube/dependabot/github_actions/docker/build-push-action-6
Bump docker/build-push-action from 2 to 6
2024-08-13 14:28:00 +02:00
Pablo Zmdl
8dc8f0594f Merge pull request #9558 from roundcube/dependabot/github_actions/docker/login-action-3
Bump docker/login-action from 1 to 3
2024-08-13 14:27:19 +02:00
Pablo Zmdl
78214682e8 Merge pull request #9557 from roundcube/dependabot/github_actions/skjnldsv/check-actor-permission-3
Bump skjnldsv/check-actor-permission from 2 to 3
2024-08-13 14:26:46 +02:00
Aleksander Machniak
c821822af5 CI: Add workaround for phpstan error 2024-08-02 09:48:18 +02:00
dependabot[bot]
d6bfeecd62 Bump docker/login-action from 1 to 3
Bumps [docker/login-action](https://github.com/docker/login-action) from 1 to 3.
- [Release notes](https://github.com/docker/login-action/releases)
- [Commits](https://github.com/docker/login-action/compare/v1...v3)

---
updated-dependencies:
- dependency-name: docker/login-action
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-07-29 06:21:29 +00:00
dependabot[bot]
8b5c7eb11b Bump skjnldsv/check-actor-permission from 2 to 3
Bumps [skjnldsv/check-actor-permission](https://github.com/skjnldsv/check-actor-permission) from 2 to 3.
- [Release notes](https://github.com/skjnldsv/check-actor-permission/releases)
- [Commits](https://github.com/skjnldsv/check-actor-permission/compare/v2...v3)

---
updated-dependencies:
- dependency-name: skjnldsv/check-actor-permission
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-07-29 06:21:26 +00:00
dependabot[bot]
3c43b86db5 Bump docker/build-push-action from 2 to 6
Bumps [docker/build-push-action](https://github.com/docker/build-push-action) from 2 to 6.
- [Release notes](https://github.com/docker/build-push-action/releases)
- [Commits](https://github.com/docker/build-push-action/compare/v2...v6)

---
updated-dependencies:
- dependency-name: docker/build-push-action
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-07-29 06:21:23 +00:00
Pablo Zmdl
85094706f9 Docker compose for testing (#9525)
* 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/
2024-07-22 11:44:09 +02:00
Pablo Zmdl
56f05e6792 Some wording changes to the issue templates (#9547)
* make it clearer that if you're looking for help, the forum is the
  right place.
* make all headlines full sentences
* fix a typo
2024-07-15 18:09:37 +02:00
Aleksander Machniak
4dac665065 Dependabot versioning-strategy set to "widen" 2024-06-09 09:08:37 +02:00
Aleksander Machniak
9dc9800804 CI: Use local tools in browser tests too 2024-06-08 15:00:35 +02:00
Aleksander Machniak
4714066354 CI: Use npm install 2024-06-08 13:56:34 +02:00
Pablo Zmdl
3d4c23e9b0 Make dependabot check dependencies for NPM and composer (#9479)
* Make dependabot check dependencies for NPM and composer

* Install JS dev requirements through package.json

This way we can have them automatically checked for newer versions.

* Add JS prod dependencies to packages.json for version tracking

They are added as optional dependencies, so we can skip their
installation with `--omit=optional` (as used in the Makefile), but we
can still have them checked for version updates automatically.

The package "publickey" is missing, because it's not available on
npmjs.com, but it hasn't seen updates in years anyway. We probably
should set up a different automatic check for updates nonetheless.

* Remove npm-related files when preparing packaging
2024-06-08 09:13:23 +02:00
Philip Weir
679d5552d6 Add github issue templates (#9361)
* add github issue templates [skip ci]

* remove labels, fix line endings
2024-06-01 09:29:06 +02:00
Michael Voříšek
736795326c Fix plugins composer.json format (#9405)
* 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
2024-04-05 17:55:46 +02:00
Michael Voříšek
bdd5de55b5 Rename composer.json.dist to composer.json (#9279)
* Rename composer.json.dist to composer.json
* fix update
2024-04-03 18:06:01 +02:00
Aleksander Machniak
95f1555900 GA: Use wget -q 2024-04-01 12:14:06 +02:00
Michael Voříšek
740267fac0 Lint JS files using eslint and normalize JS indentation (#9280)
* Lint JS using eslint

* Fix "comma-spacing"

* Fix "semi"

* Fix indent to unified 4 spaces as for PHP

* ignore symlinked public_html/* files
2023-12-23 17:08:32 +01:00
Michael Voříšek
9ea87a14b2 Do not analyse symlinked public_html files (#9273)
* 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
2023-12-20 20:06:59 +01:00
Michael Voříšek
28c778b7a0 Modernize more CS III (#9270)
* fix "single_trait_insert_per_statement"

* fix "empty_loop_condition"

* fix "backtick_to_shell_exec"

* fix "phpdoc_to_comment"

* fix "no_empty_statement"

* fix "heredoc_to_nowdoc"

* fix "class_reference_name_casing"

* fix "align_multiline_comment"

* fix "heredoc_indentation"

* fix "constant_case"

* fix "single_line_comment_style"

* fix "no_null_property_initialization"

* fix "standardize_increment"

* fix "no_unneeded_control_parentheses"

* fix missing NL after "<?php"

* fix php in *.sh files too

* fix trailing spaces from all text files

* fix "explicit_indirect_variable"

* Revert "fix "align_multiline_comment""

This reverts commit 42e584f8e3.

* fix "align_multiline_comment" properly

* Revert "fix trailing spaces from all text files" - diff files only

* Revert "Revert "fix trailing spaces from all text files" - diff files only"

This reverts commit 2101c2a3a3.

* rm useless "setup-php" config
2023-12-18 07:46:51 +01:00
Michael Voříšek
e7d7e62146 Modernize more basic CS II (#9254)
* fix "integer_literal_case"

* fix "phpdoc_separation"

* fix "phpdoc_var_without_name"

* fix "operator_linebreak"

* fix "no_alias_language_construct_call"

* fix "list_syntax"

* fix "concat_space"

* fix "array_syntax"

* fix "binary_operator_spaces"

* fix "binary_operator_spaces" relaxed

* fix "phpdoc_types_order"

* fix "phpdoc_trim"

* fix "native_type_declaration_casing"

* fix "method_chaining_indentation"

* fix "phpdoc_no_package"

* fix "elseif"

* fix PHP CS Fixer config itself too

* fix "native_type_declaration_casing"
2023-12-17 13:14:45 +01:00
Michael Voříšek
a4e160a1c1 Add Static Analysis to CI (#9262) 2023-12-17 09:45:46 +01:00
Michael Voříšek
f5d7673baa 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 <alec@alec.pl>
2023-12-16 15:48:10 +01:00
Michael Voříšek
a8707ae220 Fix and assert basic CS using CI (#9246)
* Assert CS using CI

* fix "single_blank_line_at_eof"

* fix "statement_indentation"

* fix "switch_case_semicolon_to_colon"

* fix "control_structure_braces"

* fix "statement_indentation"

* fix "no_whitespace_in_blank_line"

* fix "no_trailing_whitespace_in_comment"

* fix "no_trailing_whitespace"

* fix "single_space_around_construct"

* fix "spaces_inside_parentheses"

* fix "ternary_operator_spaces"

* fix "trim_array_spaces"

* fix "whitespace_after_comma_in_array"

* fix "cast_spaces"

* fix "unary_operator_spaces"

* fix "no_trailing_comma_in_singleline"

* fix "ordered_imports"

* fix "no_unused_imports"

* Check composer.json format

* fix CI job name

* file header comments are not phpdoc

* fix "phpdoc_indent"

* fix "braces_position"

* fix "phpdoc_types"

* fix "no_blank_lines_after_class_opening"

* fix "no_multiple_statements_per_line"

* fix "multiline_comment_opening_closing"

* fix "single_line_empty_body"

* fix "non_printable_character"

* fix "phpdoc_trim_consecutive_blank_line_separation"

* fix "include"

* fix "no_mixed_echo_print"

---------

Co-authored-by: Aleksander Machniak <alec@alec.pl>
2023-12-16 15:37:43 +01:00
Michael Voříšek
efd9605941 Fix minimal kolab/net_ldap3 version for PHP 8.3 (#9263) 2023-12-13 08:20:09 +01:00
Michael Voříšek
600bbf608e Run unit tests in CI on Windows too (#9251)
* 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
2023-12-10 16:18:04 +01:00
dependabot[bot]
75fa7a9700 Bump actions/setup-java from 3 to 4 (#9236)
Bumps [actions/setup-java](https://github.com/actions/setup-java) from 3 to 4.
- [Release notes](https://github.com/actions/setup-java/releases)
- [Commits](https://github.com/actions/setup-java/compare/v3...v4)

---
updated-dependencies:
- dependency-name: actions/setup-java
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-12-04 07:45:34 +01:00
Aleksander Machniak
aa873dedbc CI: Disable browser tests in mobile mode 2023-11-28 19:59:00 +01:00
dependabot[bot]
ecaada4030 Tests: Bump actions/setup-node from 3 to 4 (#9194)
Bumps [actions/setup-node](https://github.com/actions/setup-node) from 3 to 4.
- [Release notes](https://github.com/actions/setup-node/releases)
- [Commits](https://github.com/actions/setup-node/compare/v3...v4)

---
updated-dependencies:
- dependency-name: actions/setup-node
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-10-30 10:02:48 +01:00