Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add CircleCI conf file #2703

Merged
merged 1 commit into from
Oct 22, 2015
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
39 changes: 39 additions & 0 deletions circle.yml
Original file line number Diff line number Diff line change
@@ -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