-
Notifications
You must be signed in to change notification settings - Fork 2
/
circle.yml
74 lines (72 loc) · 2.75 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
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
machine:
node:
version: 6.1.0
timezone:
America/Chicago
php:
version: 7.0.11
environment:
# In addition to the environment variables defined in this file, these
# other variables are defined in the Circle CI UI.
#
# TERMINUS_SITE: Name of the Pantheon site to run tests on, e.g. my_site
# TERMINUS_TOKEN: The Pantheon machine token
# GITHUB_TOKEN: The GitHub personal access token
# GIT_EMAIL: The email address to use when making commits
# SLACK_URL: The Slack Endpoint for sending notifications
#
DEFAULT_ENV: ci-test
TERMINUS_ENV: ${TERMINUS_ENV:-$DEFAULT_ENV}
PATH: $PATH:~/.composer/vendor/bin:~/.config/composer/vendor/bin:tests/scripts
dependencies:
cache_directories:
- ~/.composer
- /opt/circleci/nodejs/v5.5.0/lib/node_modules
- /opt/circleci/nodejs/v5.5.0/bin
pre:
# Notify Slack It Is All Happening
- php -f scripts/slack/slack_notify.php circle "${CIRCLE_BUILD_NUM}"
# Setup the Proper Git Credentials
- composer config --global github-oauth.github.com $GITHUB_TOKEN
- git config --global user.email "$GIT_EMAIL"
- git config --global user.name "Circle CI"
override:
# Setup the Proper Tooling
- composer global require -n "pantheon-systems/terminus:^1"
- mkdir -p ~/.terminus/plugins
- composer create-project -n -d ~/.terminus/plugins pantheon-systems/terminus-build-tools-plugin:^1
# Setup SASS Compiling for Theme
- php -f scripts/slack/slack_notify.php sass
- sudo apt-get install ruby-sass
- sass web/themes/museum/custom.style.scss web/themes/museum/custom.style.css
# Setup the Visual Regression
- npm install -g backstopjs
- npm install -g slimerjs
post:
# Run Composer to Build the Site Components
- php -f scripts/slack/slack_notify.php composer
- composer -n install
# Login with Terminus
- php -f scripts/slack/slack_notify.php terminus
- terminus auth:login -n --machine-token="$TERMINUS_TOKEN"
# Wake the Development Site
- terminus env:wake -n "$TERMINUS_SITE.dev"
# Setup the CI Testing Environment
- php -f scripts/slack/slack_notify.php pantheon_multidev
- terminus build-env:push-code "$TERMINUS_SITE.$TERMINUS_ENV" --yes
test:
override:
# Run Behat Testing
- php -f scripts/slack/slack_notify.php behat
- run-behat
- php -f scripts/slack/slack_notify.php behat_finished
# Run Visual Regression Testing
- php -f scripts/slack/slack_notify.php visualregression
- run-visual
deployment:
build-assets:
branch: master
commands:
# Merge the Code from the Testing Environment to Master
- php -f scripts/slack/slack_notify.php pantheon_dev
- terminus build-env:merge -n "$TERMINUS_SITE.$TERMINUS_ENV" --yes