forked from GetDKAN/dkan_starter
-
Notifications
You must be signed in to change notification settings - Fork 0
/
circle.yml
66 lines (60 loc) · 2.38 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
## Customize the test machine
machine:
php:
version: '5.6.22'
# Add some environment variables
environment:
PATH: $PATH:$HOME/.config/composer/vendor/bin
DATABASE_URL: mysql://ubuntu:@127.0.0.1:3306/circle_test
# Timeouts issues happen when selenium tries to spawn a new chrome instance.
# I've nail that down to this selenium issue
# https://github.com/SeleniumHQ/docker-selenium/issues/87
DBUS_SESSION_BUS_ADDRESS: /dev/null
## Customize checkout
## Note: Only post is supported.
checkout:
post:
# Remove the extra composer stuff that circleci loads and that is causing
# conflicts with drush.
- rm -rf ~/.composer
## Unset secure_file_priv on mysql.
database:
pre:
- echo -e 'secure_file_priv = ""' | sudo sh -c "cat >> /etc/mysql/my.cnf"
- sudo /usr/sbin/service mysql restart
## Customize dependencies
dependencies:
cache_directories:
- "~/.drush"
pre:
- rm /opt/circleci/php/$(phpenv global)/etc/conf.d/xdebug.ini
- echo "memory_limit = 256M" > $PHPENV_ROOT/versions/$(phpenv global)/etc/conf.d/memory.ini
- echo "always_populate_raw_post_data = -1" > $PHPENV_ROOT/versions/$(phpenv global)/etc/conf.d/deprecated.ini
- sudo apt-get update -y && sudo apt-get install -y x11vnc clamav clamav-freshclam
- yes | sudo perl -MCPAN -e "install Digest::HMAC_SHA1;"
override:
- printenv
- mkdir $CIRCLE_ARTIFACTS/junit
- cd tests; composer install; cd ..
- bash dkan/dkan-init.sh dkan --deps-only
- drush dl -n registry_rebuild-7.x
- ahoy site up --db-user=ubuntu --db-pass='' --db-host=127.0.0.1 --db-port=3306 --db-name=circle_test
- ahoy utils fail-when-bad-disable
# Run a webserver using drush.
- 'ahoy drush --yes runserver :8888':
background: true
- wget http://selenium-release.storage.googleapis.com/2.53/selenium-server-standalone-2.53.1.jar
- java -jar selenium-server-standalone-2.53.1.jar -p 4444 :
background: true
post:
- x11vnc -forever -nopw:
background: true
## Customize test commands
test:
override:
- BEHAT_FOLDER=$HOME/$CIRCLE_PROJECT_REPONAME/tests ruby dkan/.ahoy/.scripts/circle-behat.rb tests/features dkan/test/features config/tests/features --tags='~@customizable&&~@fixme&&~@testBug':
timeout: 1200
parallel: true
post:
- echo $CIRCLE_ARTIFACTS; cp -av tests/assets $CIRCLE_ARTIFACTS:
parallel: true