This repository has been archived by the owner on Jun 3, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 10
/
circle.yml
68 lines (63 loc) · 2.59 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
## 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"
- echo -e 'max_allowed_packet = 128M' | sudo sh -c "cat >> /etc/mysql/my.cnf"
- echo -e 'innodb_buffer_pool_size=256M ' | 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
- 'PATH=/home/ubuntu/.config/composer/vendor/bin:$PATH ahoy dkan server':
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
- ahoy build test:
parallel: false
post:
- echo $CIRCLE_ARTIFACTS; cp -av tests/assets $CIRCLE_ARTIFACTS:
parallel: true