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 e5b52b7
Show file tree
Hide file tree
Showing 2 changed files with 42 additions and 1 deletion.
2 changes: 1 addition & 1 deletion .github/workflows/drs_ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@ jobs:
- name: Before Script
run: ../orca/bin/ci/before_script.sh
- name: Script
run: ../orca/bin/ci/script.sh
run: ./tests/scripts/ci/script.sh
- name: After script
run: |
../orca/bin/ci/after_success.sh
Expand Down
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/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 "orca 'qa:automated-tests' '--sut=$ORCA_SUT_NAME --sut-only"
fi

0 comments on commit e5b52b7

Please sign in to comment.