paster creates some travis boilerprate for you when you create a new extension.
Some examples:
The harvester base extension includes testing for the harvest process.
With Ckan Cloud docker repo we use like this:
docker-compose -f docker-compose.yaml \
-f .docker-compose-db.yaml \
-f .docker-compose.datagov-theme.yaml \
run ckan /bin/bash
source /usr/lib/ckan/venv/bin/activate
# list harvest sources
paster --plugin=ckanext-harvest harvester sources --config /etc/ckan/production.ini
# check the job
paster --plugin=ckanext-harvest harvester jobs --config /etc/ckan/production.ini
# Run ALL jobs to the queue
paster --plugin=ckanext-harvest harvester run --config /etc/ckan/production.ini
# #### TEST (from harvestesr base)
# install some dev reqs
pip install factory-boy mock
# test source by ID
paster --plugin=ckanext-harvest harvester run_test onhir-test-200 --config /etc/ckan/production.ini
Running at CircleCI
#!/bin/sh -e
nosetests --ckan --with-pylons=subdir/test.ini ckanext/datajson