forked from ezeasorekene/wp-saml-auth
-
Notifications
You must be signed in to change notification settings - Fork 0
/
circle.yml
47 lines (47 loc) · 2.01 KB
/
circle.yml
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
41
42
43
44
45
46
47
version: 2
jobs:
build:
working_directory: ~/pantheon-systems/wp-saml-auth
parallelism: 1
docker:
- image: circleci/php:7.2
steps:
- checkout
- run: |
sudo apt-get install -y libmcrypt-dev
sudo pecl config-set php_ini "${PHP_INI_DIR}/php.ini"
sudo yes '' | sudo pecl install channel://pecl.php.net/mcrypt-1.0.1
sudo -E docker-php-ext-enable mcrypt
- run: echo -e "[Date]\ndate.timezone = UTC" | sudo tee /usr/local/etc/php/php.ini > /dev/null
- run: echo $(openssl rand -hex 8) > /tmp/WORDPRESS_ADMIN_PASSWORD
- run: |
echo 'export PATH=/tmp/terminus/bin:$PATH' >> $BASH_ENV
echo 'export TERMINUS_ENV=ci-$CIRCLE_BUILD_NUM' >> $BASH_ENV
echo 'export TERMINUS_SITE=wp-saml-auth' >> $BASH_ENV
echo 'export SITE_ENV=wp-saml-auth.ci-$CIRCLE_BUILD_NUM' >> $BASH_ENV
echo 'export WORDPRESS_ADMIN_USERNAME=pantheon' >> $BASH_ENV
echo 'export [email protected]' >> $BASH_ENV
echo 'export WORDPRESS_ADMIN_PASSWORD=$(cat /tmp/WORDPRESS_ADMIN_PASSWORD)' >> $BASH_ENV
source $BASH_ENV
- run: echo "StrictHostKeyChecking no" >> "$HOME/.ssh/config"
- run: |
if [ -z "$GITHUB_TOKEN" ]; then
echo "GITHUB_TOKEN environment variables missing; assuming unauthenticated build"
exit 0
fi
echo "Setting GitHub OAuth token with suppressed ouput"
{
composer config -g github-oauth.github.com $GITHUB_TOKEN
} &> /dev/null
- run: |
if [ -z "$TERMINUS_TOKEN" ]; then
echo "TERMINUS_TOKEN environment variables missing; assuming unauthenticated build"
exit 0
fi
composer install
git clone --branch master https://github.com/pantheon-systems/terminus.git /tmp/terminus
cd /tmp/terminus && composer install
terminus auth:login --machine-token=$TERMINUS_TOKEN
- run: ./bin/behat-prepare.sh
- run: ./bin/behat-test.sh --strict
- run: ./bin/behat-cleanup.sh