forked from inveniosoftware/claimstore
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.travis.yml
69 lines (57 loc) · 2.22 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
69
# -*- coding: utf-8 -*-
#
# This file is part of ClaimStore.
# Copyright (C) 2015 CERN.
#
# ClaimStore is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 3 of the License, or
# (at your option) any later version.
#
# ClaimStore is distributed in the hope that it will be useful, but
# WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
# General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with ClaimStore; if not, write to the Free Software
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307,
# USA.
sudo: false
notifications:
email: false
language: python
python:
- "3.4"
addons:
postgresql: "9.4"
env:
- SQLALCHEMY_DATABASE_URI=postgres://postgres@localhost:5432/postgres
cache:
- pip
before_install:
- travis_retry pip install kwalitee --pre
- echo ${TRAVIS_COMMIT_RANGE}
- |
# inspiration from https://github.com/trevp/tlslite/blob/master/.travis.yml
# workaround for https://github.com/travis-ci/travis-ci/issues/2666
if [ "$TRAVIS_PULL_REQUEST" != "false" ]; then
URL="https://github.com/${TRAVIS_REPO_SLUG}/pull/${TRAVIS_PULL_REQUEST}.patch"
PR_FIRST=$(curl --silent --show-error --location $URL | head -1 | grep -o -E '\b[0-9a-f]{40}\b' | tr -d '\n')
TRAVIS_COMMIT_RANGE=$PR_FIRST^..$TRAVIS_COMMIT
fi
- echo ${TRAVIS_COMMIT_RANGE}
install:
- travis_retry pip install --upgrade pip
- travis_retry pip install -e .[tests]
before_script:
- travis_retry pip install kwalitee GitPython --pre # needs recent pep257
- kwalitee check message -s ${TRAVIS_COMMIT_RANGE}
- travis_retry pip install pytest-pep257 # needs older pep257
- travis_retry pip install sphinx
- sphinx-apidoc -f -e -o docs/api/ claimstore
- if [ -n "$(git status -s)" ]; then echo "Mismatch between the output of sphinx-apidoc and the files in docs/api/*. Please, run 'sphinx-apidoc -f -e -o docs/api/ claimstore' and commit/push again." && exit 1; fi
script:
- python setup.py test
after_success:
- coveralls