AMD64
Go: 1.8
Git
language: go
go: 1.8
install:
- make prereqs
- make deps
script:
- make build
- make test
.travis.yml
language: python
python:
- "2.7"
- "3.5"
sudo: required
dist: precise
addons:
postgresql: "9.4"
apt:
packages:
- libxml2-dev
- libxslt-dev
- postgresql-plpython-9.4
- postgresql-plpython3-9.4
- postgresql-server-dev-9.4
before_install:
- pip install -r requirements/test.txt
- export PYTHON_VERSION=${TRAVIS_PYTHON_VERSION%.*}
- make lint
# remove zope.interface installed from aptitude
- sudo apt-get purge python-zope.interface
- git clone https://github.com/petere/plxslt.git
- cd plxslt && sudo make && sudo make install && cd ..
# * Install rhaptos.cnxmlutils
# - git clone https://github.com/Connexions/rhaptos.cnxmlutils.git
# - cd rhaptos.cnxmlutils && python setup.py install && cd ..
# Install the coverage utility and codecov reporting utility
- pip install codecov
# Use plpython3u for python 3 tests
- if [[ $PYTHON_VERSION -eq 3 ]]; then sed -i 's/plpythonu/plpython3u/' $(git grep -l plpythonu cnxdb/ tests/); fi
install:
# Uninstall, because cnx-archive installs it due to the circular dependence.
- pip uninstall -y cnx-db
- pip install .
before_script:
# Set up postgres roles
- psql -U postgres -c "CREATE USER tester WITH SUPERUSER PASSWORD 'tester';"
# Set up the database
- createdb -U postgres -O tester testing
- git clone https://github.com/okbob/session_exec.git
- cd session_exec
- git checkout dc2885e08fbd1ebef9170047fde53167b1f28c70
- make USE_PGXS=1 -e && sudo make USE_PGXS=1 -e install
- cd ..
- export PYPREFIX=$(python -c 'import sys; print(sys.prefix)')
- export PYVERDIR=$(python -c 'import sys; print("python%d.%d" % sys.version_info[:2])')
script:
# This is the same as `python setup.py test` with a coverage wrapper.
- py.test --cov="$PYPREFIX/lib/$PYVERDIR/site-packages/cnxdb"
# If this is python3, we need to undo the plpython3u changes
- git reset --hard HEAD
# Test migrations
- script/ci_test_migrations.sh
after_success:
# Report test coverage to codecov.io
- codecov
notifications:
email: false
Build Config
{
"go": [
"1.8"
],
"os": [
"linux"
],
"dist": "trusty",
"sudo": false,
"script": [
"make build",
"make test"
],
"install": [
"make prereqs",
"make deps"
],
"language": "go"
}