-
Notifications
You must be signed in to change notification settings - Fork 108
/
circle.yml
69 lines (57 loc) · 1.96 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
machine:
environment:
APP_URL: http://0.0.0.0:8888
APP_ENV: testing
APP_DEBUG: true
TESTING: true
DB_HOST: 127.0.0.1
DB_DATABASE: circle_test
DB_USERNAME: ubuntu
BROADCAST_DRIVER: log
CACHE_DRIVER: array
SESSION_DRIVER: database
QUEUE_DRIVER: sync
MAIL_DRIVER: log
node:
version: 6.1.0
php:
version: 5.6.22
services:
- redis
dependencies:
override:
- make clean
- make deps
- make build-prod
post:
# Undo CircleCI broken link
- sudo unlink /usr/lib/apache2/modules/libphp5.so
# Make proper link
- sudo ln -s $PHPENV_ROOT/versions/$(phpenv global)/usr/lib/apache2/modules/libphp5.so /usr/lib/apache2/modules/libphp5.so
# Setup environment for Apache
- env | xargs -I {} echo "export '{}'" | sudo tee --append /etc/apache2/envvars > /dev/null
# Install our config and make it active
- sed -i "s/{{REPO}}/$CIRCLE_PROJECT_REPONAME/g" circleci/apache.conf
- sudo cp -f circleci/apache.conf /etc/apache2/sites-available/madison.conf
- sudo a2enmod rewrite actions alias headers negotiation dir vhost_alias deflate
- sudo a2ensite madison
- sudo service apache2 restart
# Fix connection to MySQL
- echo "pdo_mysql.default_socket=/var/run/mysqld/mysqld.sock" > /opt/circleci/php/$(phpenv global)/etc/conf.d/mysql.ini
# Create blank log file and let Apache write to it
- touch ./storage/logs/laravel.log
- sudo chgrp -R www-data ./storage
cache_directories:
- "vendor"
test:
override:
- make test
post:
- cp /var/log/apache2/error.log $CIRCLE_ARTIFACTS/apache_error.log
- cp /var/log/apache2/other_vhosts_access.log $CIRCLE_ARTIFACTS/apache_traffic.log
- cp ./storage/logs/laravel.log $CIRCLE_ARTIFACTS/laravel.log
- cp -r ./tests/Browser/screenshots $CIRCLE_ARTIFACTS/
- cp -r ./tests/Browser/console $CIRCLE_ARTIFACTS/
notify:
webhooks:
- url: https://phabricator.opengovfoundation.org/harbormaster/hook/circleci/