forked from pantheon-systems/wp-redis
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathcircle.yml
41 lines (41 loc) · 1.66 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
version: 2
jobs:
build:
working_directory: ~/pantheon-systems/wp-redis
parallelism: 1
docker:
- image: circleci/php:7.1
steps:
- checkout
- 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-redis' >> $BASH_ENV
echo 'export SITE_ENV=wp-redis.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