forked from roundcube/roundcubemail
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
This allows the tests to be run in three ways, with almost identical setup code: * in github-CI, * locally via docker compose, * locally on the host as a script.
- Loading branch information
Showing
10 changed files
with
106 additions
and
147 deletions.
There are no files selected for viewing
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,60 @@ | ||
#!/bin/bash -ex | ||
|
||
# The script is intended for use locally, as well as in the CI. | ||
# It runs the browser-tests ("E2E" in the CI). | ||
# It expects a running IMAP server (connection configured in | ||
# `config-test.inc.php`, and a running Chrome/Chromium browser (connection | ||
# hard-coded in code, overrideable via environment variables). | ||
|
||
# Make temp and logs writeable to everyone. | ||
chmod 777 temp logs | ||
|
||
# Create downloads dir and ensure it's writeable to everyone (if it's set, | ||
# the variable might be blank if tests are not run using containers). | ||
if test -n "$DOWNLOADS_DIR"; then | ||
# Create downloads dir and ensure everyone can write into it (it's being used | ||
# from different containers). | ||
mkdir -p "$DOWNLOADS_DIR" | ||
chmod 777 "$DOWNLOADS_DIR" | ||
fi | ||
|
||
if ! test -f config/config-test.inc.php; then | ||
cp -v .ci/config-test.inc.php config/config-test.inc.php | ||
fi | ||
|
||
# Install dependencies for to remote control the browser. | ||
composer require -n "nesbot/carbon:^2.62.1" --no-update | ||
composer require -n "laravel/dusk:^7.9" --no-update | ||
|
||
if $(echo $PHP_VERSION | grep -q '^8.3'); then | ||
# Downgrade dependencies (for PHP 8.3 only) | ||
composer update --prefer-dist --prefer-stable --prefer-lowest --no-interaction --no-progress --optimize-autoloader | ||
else | ||
composer update --prefer-dist --no-interaction --no-progress | ||
fi | ||
|
||
# Install development tools. | ||
npm install | ||
|
||
# Install javascript dependencies | ||
bin/install-jsdeps.sh | ||
|
||
# Compile Elastic's styles | ||
npx lessc --clean-css="--s1 --advanced" skins/elastic/styles/styles.less > skins/elastic/styles/styles.min.css | ||
npx lessc --clean-css="--s1 --advanced" skins/elastic/styles/print.less > skins/elastic/styles/print.min.css | ||
npx lessc --clean-css="--s1 --advanced" skins/elastic/styles/embed.less > skins/elastic/styles/embed.min.css | ||
|
||
# Use minified javascript files | ||
bin/jsshrink.sh | ||
|
||
# Export some variables used in the testing code. | ||
#export WEBDRIVER_CONNECT_URL SERVER_URL SERVER_BIND DOWNLOADS_DIR | ||
|
||
# Run tests | ||
echo "TESTS_MODE: DESKTOP" \ | ||
&& TESTS_MODE=desktop vendor/bin/phpunit -c tests/Browser/phpunit.xml --fail-on-warning --fail-on-risky --exclude-group=failsonga \ | ||
&& echo "TESTS_MODE: TABLET" \ | ||
&& TESTS_MODE=tablet vendor/bin/phpunit -c tests/Browser/phpunit.xml --fail-on-warning --fail-on-risky --exclude-group=failsonga-tablet \ | ||
# Mobile mode tests are unreliable on Github Actions | ||
# && echo "TESTS_MODE: PHONE" \ | ||
# && TESTS_MODE=phone vendor/bin/phpunit -c tests/Browser/phpunit.xml --fail-on-warning --fail-on-risky --exclude-group=failsonga-phone \ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
#!/bin/bash -ex | ||
|
||
if ! test -f config/config-test.inc.php; then | ||
cp -v .ci/config-test.inc.php config/config-test.inc.php | ||
fi | ||
|
||
composer require "kolab/net_ldap3:~1.1.4" --no-update | ||
|
||
# Install dependencies, prefer highest. | ||
composer update --prefer-dist --no-interaction --no-progress | ||
|
||
# Execute tests. | ||
vendor/bin/phpunit -c tests/phpunit.xml --fail-on-warning --fail-on-risky | ||
|
||
# Downgrade dependencies to the lowest versions. | ||
composer update --prefer-dist --prefer-stable --prefer-lowest --no-interaction --no-progress --optimize-autoloader | ||
|
||
# Execute tests again. | ||
vendor/bin/phpunit -c tests/phpunit.xml --fail-on-warning --fail-on-risky |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters