This repository has been archived by the owner on Jan 3, 2019. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 2
/
.travis.yml
68 lines (62 loc) · 2.45 KB
/
.travis.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
language: python
python:
- "2.7"
addons:
postgresql: 9.4
before_install:
- sudo apt-get update
- sudo apt-get remove python-zope.interface
# Install cnx-archive
# * Install the 'plpython' extension language
- sudo apt-get install postgresql-plpython-9.4
# * Install the 'plxslt' extension language
- sudo apt-get install libxml2-dev libxslt-dev postgresql-server-dev-9.4
- git clone https://github.com/petere/plxslt.git
- cd plxslt && sudo make && sudo make install && cd ..
# * Install cnx-query-grammar
- git clone https://github.com/Connexions/cnx-query-grammar.git
- cd cnx-query-grammar && python setup.py install && cd ..
# * Install cnx-epub
- git clone https://github.com/Connexions/cnx-epub.git
- cd cnx-epub && python setup.py install && cd ..
# * Install rhaptos.cnxmlutils
- git clone https://github.com/Connexions/rhaptos.cnxmlutils.git
- cd rhaptos.cnxmlutils && python setup.py install && cd ..
# * Install bug-fixes branch of plpydbapi
- git clone -b bug-fixes https://github.com/Connexions/plpydbapi.git
- cd plpydbapi && python setup.py install && cd ..
# * Install cnx-archive
- git clone https://github.com/Connexions/cnx-archive.git
- cd cnx-archive && python setup.py install && cd ..
# Install cnx-publishing
# * Install cnx-publishing
- git clone https://github.com/Connexions/cnx-publishing.git
- cd cnx-publishing && python setup.py install && cd ..
# Set up postgres roles
- sudo -u postgres psql -d postgres -c "CREATE USER cnxauthoring WITH SUPERUSER PASSWORD 'cnxauthoring';"
- sudo -u postgres psql -d postgres -c "CREATE USER cnxarchive WITH SUPERUSER PASSWORD 'cnxarchive';"
# Set up the database
- sudo -u postgres createdb -O cnxauthoring authoring-test
- sudo -u postgres createdb -O cnxarchive cnxarchive-testing
# Set up postgres to load virtualenv
- git clone https://github.com/okbob/session_exec
- cd session_exec
- make USE_PGXS=1 -e && sudo make USE_PGXS=1 -e install
- cd ..
# Install the coverage utility and codecov reporting utility
- pip install coverage
- pip install codecov
install:
- python setup.py install
- cnx-authoring-initialize_db cnxauthoring/tests/testing.ini
before_script:
- pip install pep8
- pep8 --exclude=tests *.py cnxauthoring/
- pep8 --max-line-length=200 cnxauthoring/tests
script:
- coverage run --source=cnxauthoring setup.py test
after_success:
# Report test coverage to codecov.io
- codecov
notifications:
email: false