-
Notifications
You must be signed in to change notification settings - Fork 21
/
script.sh
executable file
·41 lines (33 loc) · 1.01 KB
/
script.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
#!/usr/bin/env bash
# NAME
# script.sh - Run ORCA tests.
#
# SYNOPSIS
# script.sh
#
# DESCRIPTION
# Runs static code analysis and automated tests.
cd "$(dirname "$0")" || exit; source _includes.sh
if [[ "$ORCA_ENABLE_NIGHTWATCH" == "TRUE" && "$ORCA_SUT_HAS_NIGHTWATCH_TESTS" && -d "$ORCA_YARN_DIR" ]]; then
(
cd "$ORCA_YARN_DIR" || exit
orca fixture:run-server &
SERVER_PID=$!
if [[ "$GITLAB_CI" ]]; then
echo "ChromeDriver initialized via separate container..."
else
# @todo could we set DRUPAL_TEST_CHROMEDRIVER_AUTOSTART instead of launching Chromedriver manually?
chromedriver --disable-dev-shm-usage --disable-extensions --disable-gpu --headless --no-sandbox --port=4444 &
CHROMEDRIVER_PID=$!
fi
eval "yarn test:nightwatch \\
--headless \\
--passWithNoTests \\
--tag=$ORCA_SUT_MACHINE_NAME"
kill -0 $SERVER_PID
kill -0 $CHROMEDRIVER_PID
)
fi
if [[ "$ORCA_JOB" ]]; then
eval "orca ci:run $ORCA_JOB script $ORCA_SUT_NAME"
fi