refactor: replace custom CRM with Monica fork
Some checks failed
Build & Push Monica Image to Gitea Registry / build-and-push (push) Failing after 9s
Some checks failed
Build & Push Monica Image to Gitea Registry / build-and-push (push) Failing after 9s
This commit is contained in:
7
scripts/tests/install-chrome.sh
Normal file
7
scripts/tests/install-chrome.sh
Normal file
@@ -0,0 +1,7 @@
|
||||
#!/bin/bash
|
||||
sudo apt-get update
|
||||
sudo apt-get install lsb-release
|
||||
curl -L -o google-chrome.deb https://dl.google.com/linux/direct/google-chrome-stable_current_amd64.deb
|
||||
sudo dpkg -i google-chrome.deb
|
||||
sudo sed -i 's|HERE/chrome"|HERE/chrome" --disable-setuid-sandbox --no-sandbox|g' /opt/google/chrome/google-chrome
|
||||
rm google-chrome.deb
|
||||
36
scripts/tests/server-cc.php
Normal file
36
scripts/tests/server-cc.php
Normal file
@@ -0,0 +1,36 @@
|
||||
<?php
|
||||
|
||||
/**
|
||||
* Copy of server.php with Code Coverage capture.
|
||||
*/
|
||||
|
||||
/** Coverage files destination. */
|
||||
const STORAGE = '/results/cov';
|
||||
|
||||
$root = realpath(__DIR__.'/../../');
|
||||
|
||||
$uri = urldecode(
|
||||
parse_url($_SERVER['REQUEST_URI'], PHP_URL_PATH)
|
||||
);
|
||||
|
||||
// This file allows us to emulate Apache's "mod_rewrite" functionality from the
|
||||
// built-in PHP web server. This provides a convenient way to test a Laravel
|
||||
// application without having installed a "real" web server software here.
|
||||
if ($uri !== '/' && file_exists($root.'/public'.$uri)) {
|
||||
return false;
|
||||
}
|
||||
|
||||
/**
|
||||
* Set CodeCoverage via LiveCodeCoverage.
|
||||
*/
|
||||
require $root.'/vendor/autoload.php';
|
||||
|
||||
$shutDownCodeCoverage = \LiveCodeCoverage\LiveCodeCoverage::bootstrap(
|
||||
true,
|
||||
$root.STORAGE,
|
||||
$root.'/phpunit.xml'
|
||||
);
|
||||
|
||||
require_once $root.'/public/index.php';
|
||||
|
||||
$shutDownCodeCoverage();
|
||||
29
scripts/tests/start-selenium.sh
Normal file
29
scripts/tests/start-selenium.sh
Normal file
@@ -0,0 +1,29 @@
|
||||
#!/bin/bash
|
||||
|
||||
set -evuo pipefail
|
||||
|
||||
SELF_PATH=$(cd -P -- "$(dirname -- "$0")" && /bin/pwd -P)
|
||||
source $SELF_PATH/../realpath.sh
|
||||
ROOT=$(realpath $SELF_PATH/../..)
|
||||
|
||||
if [ -z "${DISPLAY:-}" ]; then
|
||||
echo Start Xvfb;
|
||||
export DISPLAY=:99.0;
|
||||
/sbin/start-stop-daemon --start --quiet --pidfile /tmp/custom_xvfb_99.pid --make-pidfile --background --exec /usr/bin/Xvfb -- :99 -ac -screen 0 1280x1024x24 || true;
|
||||
fi
|
||||
|
||||
if ! $(nc -z localhost 4444); then
|
||||
$ROOT/vendor/bin/selenium-server-standalone -role hub -log "$ROOT/selenium-server.log" &
|
||||
until $(nc -z localhost 4444); do
|
||||
echo Waiting for selenium hub to start...;
|
||||
sleep 1;
|
||||
done
|
||||
fi
|
||||
|
||||
if ! $(nc -z localhost 8910); then
|
||||
java -Dwebdriver.chrome.driver="$ROOT/vendor/bin/chromedriver" -jar "$ROOT/vendor/se/selenium-server-standalone/bin/selenium-server-standalone.jar" -role node -port 8910 -log "$ROOT/selenium-node.log" &
|
||||
until $(nc -z localhost 8910); do
|
||||
echo Waiting for selenium node to start...;
|
||||
sleep 1;
|
||||
done
|
||||
fi
|
||||
Reference in New Issue
Block a user