-
Notifications
You must be signed in to change notification settings - Fork 0
/
circle.yml
68 lines (54 loc) · 2.24 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
machine:
environment:
PIP_USE_MIRRORS: true
CKAN_POSTGRES_DB: ckan_test
CKAN_POSTGRES_USER: ckan_default
CKAN_POSTGRES_PWD: pass
CKAN_DATASTORE_POSTGRES_DB: datastore_test
CKAN_DATASTORE_POSTGRES_WRITE_USER: ckan_default
CKAN_DATASTORE_POSTGRES_READ_USER: datastore_default
CKAN_DATASTORE_POSTGRES_READ_PWD: pass
SOLR_HOME: $HOME/solr
node:
version: 0.10.33
dependencies:
pre:
- "[ -e ~/.local/bin/circleci-matrix ]
|| mkdir -p ~/.local/bin
&& curl -fsSL https://raw.githubusercontent.com/michaelcontento/circleci-matrix/master/src/circleci-matrix.sh -o ~/.local/bin/circleci-matrix
&& chmod +x ~/.local/bin/circleci-matrix"
override:
- pip install -r requirement-setuptools.txt
- pip install -r requirements.txt
- pip install -r dev-requirements.txt
- python setup.py develop
post:
- "[ -e ~/nvm/v0.10.33/lib/node_modules/mocha-phantomjs ]
|| npm install -g [email protected] phantomjs@~1.9.1"
cache_directories:
- ~/.local/bin/circleci-matrix
- ~/nvm/v0.10.33/lib/node_modules/mocha-phantomjs
- ~/nvm/v0.10.33/lib/node_modules/phantomjs
- ~/nvm/v0.10.33/bin/mocha-phantomjs
- ~/nvm/v0.10.33/bin/phantomjs
database:
post:
- sudo -E -u postgres ./bin/postgres_init/1_create_ckan_db.sh
- sudo -E -u postgres ./bin/postgres_init/2_create_ckan_datastore_db.sh
- sed -i -e 's/.*datastore.read_url.*/ckan.datastore.read_url = postgresql:\/\/datastore_default:pass@\/datastore_test/' test-core.ini
- paster datastore -c test-core.ini set-permissions | sudo -u postgres psql
- cp -R /opt/solr-4.3.1 $SOLR_HOME
- cd $SOLR_HOME/example; java -jar start.jar >> $HOME/solr.log:
background: true
- while ! grep "Started" $HOME/solr.log; do sleep 0.1; done
- ./bin/solr_init/create_core.sh
- paster db init -c test-core.ini
test:
override:
- circleci-matrix:
parallel: true
post:
- paster serve test-core.ini:
background: true
- sleep 5
- mocha-phantomjs http://localhost:5000/base/test/index.html