-
Notifications
You must be signed in to change notification settings - Fork 2k
/
circle.yml
53 lines (43 loc) · 1.87 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
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
dependencies:
pre:
- 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 requirements.txt --allow-all-external
- pip install -r dev-requirements.txt --allow-all-external
- python setup.py develop
post:
- for tries in `seq 5`; do if npm install -g mocha-phantomjs@3.5.0 phantomjs@~1.9.1; then break; fi; sleep 5; endfor
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 $HOME/solr
- cp ckan/config/solr/schema.xml $HOME/solr/example/solr/collection1/conf
- cd $HOME/solr/example; java -jar start.jar >> $HOME/solr.log:
background: true
- paster db init -c test-core.ini
test:
pre:
- mkdir -p $CIRCLE_TEST_REPORTS/nose
override:
- circleci-matrix:
parallel: true
post:
- paster serve test-core.ini:
background: true
- sleep 5
- mocha-phantomjs http://localhost:5000/base/test/index.html