Commit Graph

51 Commits

Author SHA1 Message Date
Aleksander Machniak
d4526968a8 Set minimum required PHP version to 8.1 (#9599) 2025-02-16 10:09:23 +01: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
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
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
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
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
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]
42c12ce843 Bump actions/checkout from 3 to 4 (#9131)
Bumps [actions/checkout](https://github.com/actions/checkout) from 3 to 4.
- [Release notes](https://github.com/actions/checkout/releases)
- [Changelog](https://github.com/actions/checkout/blob/main/CHANGELOG.md)
- [Commits](https://github.com/actions/checkout/compare/v3...v4)

---
updated-dependencies:
- dependency-name: actions/checkout
  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-09-14 08:41:19 +02:00
Aleksander Machniak
8d6845357b CI: Enable PHP 8.3 2023-07-30 09:18:08 +02:00
Aleksander Machniak
0ef21b4284 CI: error_reporting=E_ALL 2023-07-07 09:15:52 +02:00
Aleksander Machniak
47a2e2c536 Tests: Set composer platform for PHP 8.2 to fix phpunit installation 2022-08-01 08:39:31 +02:00
Aleksander Machniak
21ce4e30e7 Tests: Add PHP 8.2 2022-08-01 08:14:03 +02:00
dependabot[bot]
88183d3ff7 Bump actions/checkout from 2 to 3 (#8575)
Bumps [actions/checkout](https://github.com/actions/checkout) from 2 to 3.
- [Release notes](https://github.com/actions/checkout/releases)
- [Changelog](https://github.com/actions/checkout/blob/main/CHANGELOG.md)
- [Commits](https://github.com/actions/checkout/compare/v2...v3)

---
updated-dependencies:
- dependency-name: actions/checkout
  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>
2022-06-18 08:26:03 +02:00
Naveen
090ab03a1b chore: Set permissions for GitHub actions (#8566)
Restrict the GitHub token permissions only to the required ones; this way, even if the attackers will succeed in compromising your workflow, they won’t be able to do much.

- Included permissions for the action. https://github.com/ossf/scorecard/blob/main/docs/checks.md#token-permissions

https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions#permissions

https://docs.github.com/en/actions/using-jobs/assigning-permissions-to-jobs

[Keeping your GitHub Actions and workflows secure Part 1: Preventing pwn requests](https://securitylab.github.com/research/github-actions-preventing-pwn-requests/)

Signed-off-by: naveen <172697+naveensrinivasan@users.noreply.github.com>
2022-06-14 08:09:50 +02:00
Aleksander Machniak
619be25008 GA: Enable testing on PHP 8.1 2021-11-27 09:27:28 +01:00
Aleksander Machniak
a40225f407 GA: Install hunspell-en-us for enchant spellchecker tests 2021-08-30 19:56:27 +02:00
Aleksander Machniak
1de93a8f46 Add tests for spellchecker enchant driver 2021-08-30 19:41:55 +02:00
Aleksander Machniak
81ed20e829 Fix spellchecker tests 2021-08-29 17:47:23 +02:00
Aleksander Machniak
aec70e4a5a GA: Use sudo for apt-get command 2021-08-29 17:33:45 +02:00
Aleksander Machniak
75a6ab651a GA: Install aspell 2021-08-29 17:31:05 +02:00
Aleksander Machniak
00521bf617 Switch spellcheck tests from googie to pspell 2021-08-29 17:25:30 +02:00
Aleksander Machniak
20533a1d28 GA: Exclude tests connecting to spell.roundcube.net 2021-08-26 08:54:21 +02:00
Aleksander Machniak
d8fbb60582 GA: Remove PHP 8.1 from the matrix (for now) 2021-08-01 17:59:39 +02:00
Aleksander Machniak
c27aab3098 GA: Another attempt to get error logs 2021-07-29 20:03:13 +02:00
Aleksander Machniak
3353918d50 GA: Print errors 2021-07-29 19:51:56 +02:00
Aleksander Machniak
de0b1c8262 GA: Use ubuntu-latest 2021-07-26 10:36:22 +02:00
Aleksander Machniak
a82b592b18 GA: Fix platform for composer on PHP 8.1 2021-07-26 10:24:17 +02:00
Aleksander Machniak
d322df3f91 GA: Try again with PHP 8.1 2021-07-26 10:21:41 +02:00
Aleksander Machniak
5592f5dbe9 GA: Remove PHP 8.1 from the matrix
Some deps aren't compatible yet https://github.com/phpspec/prophecy/issues/531
2021-07-25 12:07:53 +02:00
Aleksander Machniak
bb78abb681 GA: Add PHP 8.1 to the tests matrix 2021-07-25 11:31:21 +02:00
Aleksander Machniak
89e54718ca Migration to PHPUnit v9 2021-07-25 11:07:56 +02:00
Aleksander Machniak
9e2bc40213 Dropped support for PHP < 7.3 (#7976) 2021-07-25 09:16:33 +02:00
Aleksander Machniak
985f8b0878 GA: Remove PHP 8.1 from the matrix
Looks like PHPUnit v7 does not work with it, and we can't upgrade PHPUnit version
keeping compatibility with older PHP and PHPUnit versions.
2021-07-14 10:27:07 +02:00
Aleksander Machniak
fea5c83e02 GA: Add PHP 8.1 to the matrix 2021-07-14 10:18:06 +02:00
Aleksander Machniak
c5010fcd5b GA: Add missing config for tests 2021-07-04 10:33:52 +02:00
Aleksander Machniak
cbb4adb1c9 GA: Move browser tests to a separate workflow 2021-07-04 10:31:45 +02:00
Aleksander Machniak
97440170f6 Run browser tests on Github Actions 2021-07-04 10:21:44 +02:00
Aleksander Machniak
687db08bfe CI: Only browser tests on Travis, all other tests moved to Github 2021-05-02 10:07:40 +02:00
Aleksander Machniak
85be74d77c GA: Stick to ubuntu-18.04 2020-12-19 19:51:48 +01:00
Aleksander Machniak
67314d76c0 GA: Fix job name
[skip ci]
2020-12-19 10:28:14 +01:00
Aleksander Machniak
fa8ddf594f GA: Support "[skip ci]" and "[ci skip]" tags 2020-12-19 10:25:40 +01:00
Aleksander Machniak
c0510aaab3 GA: See if we can test PHP8 now 2020-12-13 12:27:23 +01:00
Aleksander Machniak
12547ccf01 Require php-intl extension, get rid of Net_IDNA2, PHP8 fixes, short array syntax
Net_IDNA2 is not compatible, and Intl is a bundled ext since PHP 5.3.
Fixed some regressions.
2020-12-13 10:21:52 +01:00
Aleksander Machniak
70c7ca1ec8 GA/Travis: Move some tests from Travis to GA, disable php8 and windows test on GA (as they aren't possible yet) 2020-12-12 08:31:30 +01:00
Aleksander Machniak
f97a3d45d5 GA: Create config file for tests 2020-12-12 08:20:02 +01:00
Aleksander Machniak
f593b364ce GA: Fix composer install commands 2020-12-12 08:15:25 +01:00