Commit Graph

23 Commits

Author SHA1 Message Date
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
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
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
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
656baebc67 Browser Tests: Update Dusk and Greenmail 2023-02-26 11:02:53 +01: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
cd2e531092 Fix spellchecker tests (again) 2021-08-29 17:54:42 +02:00
Aleksander Machniak
00521bf617 Switch spellcheck tests from googie to pspell 2021-08-29 17:25:30 +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
Aleksander Machniak
4a08832c53 GA: Fix typo in browser_tests.yml 2021-07-04 10:41:20 +02:00
Aleksander Machniak
035407ae57 GA: Attempt to fix browser tests 2021-07-04 10:40:22 +02:00
Aleksander Machniak
cbb4adb1c9 GA: Move browser tests to a separate workflow 2021-07-04 10:31:45 +02:00