Skip to content

Commit 2fe75dc

Browse files
feat: SRE-1395 - Migration from CircleCI to GH Actions
1 parent 6375e25 commit 2fe75dc

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

bin/behat-test.sh

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,12 +6,22 @@
66
set -euo pipefail
77
set -x
88

9+
TERMINUS_USER_ID=$(terminus auth:whoami --field=id 2>&1)
10+
if [[ ! $TERMINUS_USER_ID =~ ^[A-Za-z0-9-]{36}$ ]]; then
11+
echo "Terminus unauthenticated; assuming unauthenticated build"
12+
exit 0
13+
fi
14+
915
: "${TERMINUS_SITE:?TERMINUS_SITE not set}"
1016
: "${TERMINUS_ENV:?TERMINUS_ENV not set}"
1117
: "${SIMPLESAMLPHP_VERSION:=2.4.0}"
1218
: "${WORDPRESS_ADMIN_USERNAME:=pantheon}"
1319
: "${WORDPRESS_ADMIN_EMAIL:=no-reply@getpantheon.com}"
1420
: "${WORDPRESS_ADMIN_PASSWORD:=pantheon}"
21+
if [ -z "$TERMINUS_SITE" ] || [ -z "$TERMINUS_ENV" ]; then
22+
echo "TERMINUS_SITE and TERMINUS_ENV environment variables must be set"
23+
exit 1
24+
fi
1525

1626
BASE_URL="http://${TERMINUS_ENV}-${TERMINUS_SITE}.pantheonsite.io"
1727

0 commit comments

Comments
 (0)