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
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
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
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
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
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
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
9e8e9a5ec0
Tests: Fix compatibility with Dusk 7.9
2023-07-30 10:34:04 +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
656baebc67
Browser Tests: Update Dusk and Greenmail
2023-02-26 11:02:53 +01: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]
dac551441d
Bump actions/setup-node from 2 to 3 ( #8577 )
...
Bumps [actions/setup-node](https://github.com/actions/setup-node ) from 2 to 3.
- [Release notes](https://github.com/actions/setup-node/releases )
- [Commits](https://github.com/actions/setup-node/compare/v2...v3 )
---
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>
2022-06-18 08:27:15 +02:00
dependabot[bot]
914a52a500
Bump actions/setup-java from 2 to 3 ( #8576 )
...
Bumps [actions/setup-java](https://github.com/actions/setup-java ) from 2 to 3.
- [Release notes](https://github.com/actions/setup-java/releases )
- [Commits](https://github.com/actions/setup-java/compare/v2...v3 )
---
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>
2022-06-18 08:26:21 +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
Ewout ter Hoeven
20a108e1c1
CI: Update browser tests actions ( #8351 )
...
- Use ubuntu-latest environment (currently Ubuntu 20.04 Focal)
- Setup PHP 8.1
- Use actions/setup-java@v2
- Use actions/setup-node@v2 with Node 16 LTS
2021-12-07 15:47:35 +01: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
cd2e531092
Fix spellchecker tests (again)
2021-08-29 17:54:42 +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
d995121555
GA: Attempt 2 to fix NPM deps install
2021-07-04 10:48:14 +02:00
Aleksander Machniak
84867deccb
GA: Attempt to fix NPM modules install
2021-07-04 10:47:05 +02:00