-
Notifications
You must be signed in to change notification settings - Fork 6
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
ACMS-000: Run PHPUnit tests for DRS only.
- Loading branch information
1 parent
45afedf
commit c398be4
Showing
2 changed files
with
42 additions
and
1 deletion.
There are no files selected for viewing
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
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 "qa:automated-tests' '--sut=$ORCA_SUT_NAME --sut-only" | ||
fi |