-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'master' of github.com:ViderumGlobal/ckanext-gosh
- Loading branch information
Showing
5 changed files
with
77 additions
and
31 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,13 @@ | ||
language: python | ||
python: | ||
- "2.7" | ||
env: PGVERSION=9.2 | ||
dist: trusty | ||
sudo: required | ||
cache: pip | ||
before_install: | ||
- chmod +x ./bin/travis-build.bash | ||
- chmod +x ./bin/travis-run.sh | ||
install: ./bin/travis-build.bash | ||
script: | ||
- ./bin/travis-run.sh |
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
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 |
---|---|---|
@@ -1,43 +1,32 @@ | ||
#!/bin/bash | ||
set -e | ||
|
||
echo "This is travis-build.bash..." | ||
echo "This is travis-install-dependencies..." | ||
|
||
echo "Installing the packages that CKAN requires..." | ||
sudo apt-get update -qq | ||
sudo apt-get install postgresql-$PGVERSION solr-jetty libcommons-fileupload-java:amd64=1.2.2-1 | ||
sudo apt-get install postgresql-$PGVERSION solr-jetty | ||
|
||
echo "Installing CKAN and its Python dependencies..." | ||
git clone https://github.com/ckan/ckan | ||
cd ckan | ||
export latest_ckan_release_branch=`git branch --all | grep remotes/origin/release-v | sort -r | sed 's/remotes\/origin\///g' | head -n 1` | ||
echo "CKAN branch: $latest_ckan_release_branch" | ||
git checkout $latest_ckan_release_branch | ||
git checkout "ckan-2.7.2" | ||
python setup.py develop | ||
pip install -r requirements.txt --allow-all-external | ||
pip install -r dev-requirements.txt --allow-all-external | ||
pip install -r requirements.txt | ||
pip install -r dev-requirements.txt | ||
pip install coveralls | ||
cd - | ||
|
||
echo "Creating the PostgreSQL user and database..." | ||
sudo -u postgres psql -c "CREATE USER ckan_default WITH PASSWORD 'pass';" | ||
sudo -u postgres psql -c 'CREATE DATABASE ckan_test WITH OWNER ckan_default;' | ||
|
||
echo "SOLR config..." | ||
# Solr is multicore for tests on ckan master, but it's easier to run tests on | ||
# Travis single-core. See https://github.com/ckan/ckan/issues/2972 | ||
sed -i -e 's/solr_url.*/solr_url = http:\/\/127.0.0.1:8983\/solr/' ckan/test-core.ini | ||
|
||
echo "Initialising the database..." | ||
cd ckan | ||
paster db init -c test-core.ini | ||
cd - | ||
|
||
echo "Installing ckanext-gosh and its requirements..." | ||
python setup.py develop | ||
pip install -r requirements.txt | ||
pip install -r dev-requirements.txt | ||
|
||
echo "Moving test.ini into a subdir..." | ||
mkdir subdir | ||
mv test.ini subdir | ||
|
||
echo "travis-build.bash is done." | ||
echo "travis-install-dependencies is done." |
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
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,49 @@ | ||
[DEFAULT] | ||
debug = false | ||
smtp_server = localhost | ||
error_email_from = paste@localhost | ||
|
||
[server:main] | ||
use = egg:Paste#http | ||
host = 0.0.0.0 | ||
port = 5000 | ||
|
||
[app:main] | ||
use = config:ckan/test-core.ini | ||
|
||
ckan.site_url = http://localhost:5000 | ||
|
||
solr_url = http://127.0.0.1:8983/solr | ||
|
||
# Logging configuration | ||
[loggers] | ||
keys = root, ckan, sqlalchemy | ||
|
||
[handlers] | ||
keys = console | ||
|
||
[formatters] | ||
keys = generic | ||
|
||
[logger_root] | ||
level = WARN | ||
handlers = console | ||
|
||
[logger_ckan] | ||
qualname = ckan | ||
handlers = | ||
level = INFO | ||
|
||
[logger_sqlalchemy] | ||
handlers = | ||
qualname = sqlalchemy.engine | ||
level = WARN | ||
|
||
[handler_console] | ||
class = StreamHandler | ||
args = (sys.stdout,) | ||
level = NOTSET | ||
formatter = generic | ||
|
||
[formatter_generic] | ||
format = %(asctime)s %(levelname)-5.5s [%(name)s] %(message)s |