Commit 047b50b9 authored by Willem ter Berg's avatar Willem ter Berg 💬
Browse files

refactored to include wisdom from intellegunt and dataoverheid implementations

parent 2f44bd95
Loading
Loading
Loading
Loading

.travis.yml

deleted100644 → 0
+0 −11
Original line number Diff line number Diff line
language: python
sudo: required
python:
    - "2.7"
env: PGVERSION=9.1
install:
    - bash bin/travis-build.bash
    - pip install coveralls
script: sh bin/travis-run.sh
after_success:
    - coveralls
+21 −661

File changed.

Preview size limit exceeded, changes collapsed.

MANIFEST.in

deleted100644 → 0
+0 −4
Original line number Diff line number Diff line
include README.md
include LICENSE
include requirements.txt
recursive-include ckanext/dcatdonl *.html *.json *.js *.less *.css *.mo
 No newline at end of file

bin/travis-build.bash

deleted100644 → 0
+0 −43
Original line number Diff line number Diff line
#!/bin/bash
set -e

echo "This is travis-build.bash..."

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

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
python setup.py develop
pip install -r requirements.txt --allow-all-external
pip install -r dev-requirements.txt --allow-all-external
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-dcatdonl and its requirements..."
python setup.py develop
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."
 No newline at end of file

bin/travis-run.sh

deleted100644 → 0
+0 −14
Original line number Diff line number Diff line
#!/bin/sh -e

echo "NO_START=0\nJETTY_HOST=127.0.0.1\nJETTY_PORT=8983\nJAVA_HOME=$JAVA_HOME" | sudo tee /etc/default/jetty
sudo cp ckan/ckan/config/solr/schema.xml /etc/solr/conf/schema.xml
sudo service jetty restart

nosetests --ckan \
          --nologcapture \
          --with-pylons=subdir/test.ini \
          --with-coverage \
          --cover-package=ckanext.dcatdonl \
          --cover-inclusive \
          --cover-erase \
          --cover-tests
Loading