Skip to content

Commit

Permalink
Merge pull request #2703 from ckan/circleci
Browse files Browse the repository at this point in the history
Add CircleCI conf file
  • Loading branch information
David Read committed Oct 22, 2015
2 parents 518bdbd + 43c18b8 commit e25c8e9
Showing 1 changed file with 39 additions and 0 deletions.
39 changes: 39 additions & 0 deletions circle.yml
@@ -0,0 +1,39 @@
machine:

environment:
PIP_USE_MIRRORS: true

dependencies:
override:
- pip install -r requirements.txt --allow-all-external
- pip install -r dev-requirements.txt --allow-all-external
- python setup.py develop

post:
- npm install -g mocha-phantomjs@3.5.0 phantomjs@~1.9.1

database:
post:
- sudo -u postgres psql -c "CREATE USER ckan_default WITH PASSWORD 'pass';"
- sudo -u postgres psql -c "CREATE USER datastore_default WITH PASSWORD 'pass';"
- sudo -u postgres psql -c 'CREATE DATABASE ckan_test WITH OWNER ckan_default;'
- sudo -u postgres psql -c 'CREATE DATABASE datastore_test WITH OWNER ckan_default;'
- 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:
override:
- nosetests --ckan --reset-db --with-pylons=test-core.ini --nologcapture --with-coverage --cover-package=ckan --cover-package=ckanext ckan ckanext

post:
- paster serve test-core.ini:
background: true
- sleep 5
- mocha-phantomjs http://localhost:5000/base/test/index.html

0 comments on commit e25c8e9

Please sign in to comment.