Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #2703 from ckan/circleci
Add CircleCI conf file
- Loading branch information
Showing
1 changed file
with
39 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |