-
Notifications
You must be signed in to change notification settings - Fork 33
/
circle.yml
72 lines (63 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
machine:
timezone:
America/Los_Angeles
php:
version:
7.0.4
environment:
VENDOR_TAR: "vendor.tar"
SIMPLETEST_DB: "sqlite://tmp/site.sqlite"
SIMPLETEST_BASE_URL: "http://localhost:8080"
# Override /etc/hosts
hosts:
localhost: 127.0.0.1
## Customize checkout
checkout:
post:
# Disable sendmail for local PHP for install.
- echo sendmail_path=`which true` >> ~/.phpenv/versions/$(phpenv version-name)/etc/conf.d/sendmail_disable.ini
## Customize dependencies
dependencies:
pre:
# Run composer install and cache it.
- if [[ ! -d ~/vendor-cache ]]; then mkdir ~/vendor-cache; fi
- if [[ -f ~/vendor-cache/${VENDOR_TAR} ]]; then mkdir vendor; tar -xf ~/vendor-cache/${VENDOR_TAR}; fi
- if [[ -d ./vendor/ ]]; then echo "Size of vendor directory extracted from cache:"; du -hs ./vendor/; else echo "Vendor directory does not exist"; fi
- composer --verbose --prefer-dist install
- if [[ -f ~/vendor-cache/${VENDOR_TAR} ]]; then echo "Deleting previous cache archive"; rm -fv ~/vendor-cache/$VENDOR_TAR; echo "Done"; else echo "No cache archive to delete"; fi
- echo "Creating cache archive"; tar -cf ~/vendor-cache/$VENDOR_TAR ./vendor/; echo "Done"
- echo "Size of cache archive:"; ls -lh ~/vendor-cache/$VENDOR_TAR
# Cache composer.
cache_directories:
- "~/.composer/cache"
- "~/vendor-cache/"
test:
pre:
# Provide db connection string for Drupal installation.
- printf "<?php\n\$databases['default']['default'] = ['database' => 'tmp/site.sqlite', 'prefix' => '', 'namespace' => 'Drupal\\Core\\Database\\Driver\\sqlite', 'driver' => 'sqlite'];" > ./web/sites/default/settings.local.php
# Install Drupal.
- ../vendor/bin/drush site-install --verbose --yes config_installer --db-url=${SIMPLETEST_DB}:
pwd: web
- ../vendor/bin/drush runserver --dns localhost:8080 -:
pwd: web
background: true
- sleep 3
# Configure PhantomJS
- mkdir -p /tmp/pjsdrivercache/phantomjs
override:
# Run phpunit tests.
# Core phpunit takes too long...
#- ./vendor/bin/phpunit -c web/core --exclude-group Composer
# Run PhantomJS
- phantomjs --ssl-protocol=any --ignore-ssl-errors=true ./vendor/jcalderonzumba/gastonjs/src/Client/main.js 8510 1024 768 2>&1 > /tmp/gastonjs.log:
background: true
# Run Behat tests.
- vendor/bin/behat --version
- ../vendor/bin/behat:
pwd: test
## Customize deployment commands
#deployment:
#development:
#branch: master
#commands:
#- git push %git repo% ${CIRCLE_SHA1}:master