Skip to content

Commit

Permalink
ACMS-000: Run PHPUnit tests for DRS only.
Browse files Browse the repository at this point in the history
  • Loading branch information
vishalkhode1 committed Mar 26, 2024
1 parent 45afedf commit 1877175
Showing 1 changed file with 41 additions and 0 deletions.
41 changes: 41 additions & 0 deletions tests/scripts/ci/script.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
#!/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 ${ORCA_ROOT}/bin/ci/_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 fixture:status"
eval "qa:automated-tests' '--sut=$ORCA_SUT_NAME --sut-only"
fi

0 comments on commit 1877175

Please sign in to comment.