forked from lmakarov/dde
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathcircle.yml
50 lines (46 loc) · 1.93 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
## General build settings
general:
branches:
only:
- master # Only build master
## Customize the test machine
machine:
services:
- docker # Enable docker
## Customize dependencies
dependencies:
pre:
# Install docker-compose
- wget -q https://github.com/docker/compose/releases/download/1.1.0/docker-compose-`uname -s`-`uname -m`
- sudo mv docker-compose-`uname -s`-`uname -m` /usr/local/bin/docker-compose
- sudo chmod +x /usr/local/bin/docker-compose
# Stop built-in mysql service
- sudo service mysql stop
# Configure Git
- git config --global user.email "[email protected]" && git config --global user.name "Circle CI"
# Replace sh with bash
- sudo ln -sf /bin/bash /bin/sh
# Install dsh wrapper
- curl -s https://raw.githubusercontent.com/blinkreaction/drude/master/scripts/dsh-wrapper.sh | sudo tee 1>/dev/null /usr/local/bin/dsh
- sudo chmod +x /usr/local/bin/dsh
## Customize test commands
test:
pre:
override:
# Download "drude-testing" repo
- wget https://github.com/blinkreaction/drude-testing/archive/master.zip && unzip -q master.zip && mv drude-testing-master/* .
# Spin up the docker environment
- docker-compose -f circle.docker-compose.yml up -d
# Install Drupal with Drush
- docker-compose -f circle.docker-compose.yml run cli bash -c 'cd docroot && time env PHP_OPTIONS="-d sendmail_path=`which true`" drush si -y' | tee $CIRCLE_ARTIFACTS/drush-site-install.log
# Run Behat tests
- docker-compose -f circle.docker-compose.yml run cli bash -c 'cd tests/behat && composer install --prefer-source --no-interaction && bin/behat -p docker --format=pretty --out=std --format=junit --out=junit' | tee $CIRCLE_ARTIFACTS/behat.log
post:
# Copy JUnit tests for CircleCI to parse results.
- cp -R tests/behat/junit $CIRCLE_TEST_REPORTS
## Customize deployment commands
#deployment:
# release:
# branch: master
# commands:
# - ./build.sh