forked from gramps-project/addons-source
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.travis.yml
99 lines (85 loc) · 3.26 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
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
#
# Gramps - a GTK+/GNOME based genealogy program
#
# Copyright (C) 2015-2015 Doug Blank
# Copyright (C) 2016 DaAwesomeP
# Copyright (C) 2016 QuLogic
# Copyright (C) 2016 Tim G L Lyons
#
# This program 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 2 of the License, or
# (at your option) any later version.
#
# This program 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 this program; if not, write to the Free Software
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
# After changing this file, check it on:
# http://lint.travis-ci.org/
sudo: required
dist: trusty
language: python
python:
- 3.3 # This is irrelevant, because the virtualenv is not used at all
# FIXME: The minimum requirement for Gramps is Python 3.2, so a test environment
# for Python 3.2 should be added to this environment which is Python 3.3. It
# will not be possible to run coverage under Python 3.2, because coverage is
# Python 3.3 (or above) only.
addons:
apt:
packages:
- gir1.2-pango-1.0
- gir1.2-gtk-3.0
- xdg-utils
- librsvg2-common
- libglib2.0-dev
- intltool
# - python3-gobject Provided by python3-gi
- python3-gi
- python3-cairo
- python3-gi-cairo
- python3-bsddb3
- python3-dev
- python3-nose
- python3-mock
- python3-pyicu
- python3-coverage
before_install:
install:
# The working directory is set to /home/travis/build/gramps-project/addons-source
# by the automatic git checkout.
- git clone --depth=50 --branch=maintenance/gramps50 git://github.com/gramps-project/gramps.git $TRAVIS_BUILD_DIR/../gramps
- cd $TRAVIS_BUILD_DIR/../gramps
# Build Gramps package. This seems to copy everything to
# /home/travis/build/scripts-3.3
- python setup.py build
- cd $TRAVIS_BUILD_DIR
- python3 -m compileall *
before_script:
# Create the Gramps database directory.
- mkdir -p $HOME/.gramps/grampsdb/
# Create the Gramps Addons directory.
- mkdir -p $HOME/.gramps/gramps50/plugins
# Copy Addons to Gramps Addons directory
- cp -r * $HOME/.gramps/gramps50/plugins/
# Create css directory used by webstuff
- mkdir -p $HOME/.gramps/css
script:
# Ignore the virtualenv entirely. Use nosetests3, python3 (3.4.0) and coverage
# from /usr/bin. Use libraries from /usr/lib/python3.4,
# /usr/local/lib/python3.4/dist-packages and /usr/lib/python3/dist-packages
# - nosetests3 --nologcapture --with-coverage --cover-package=gramps $EXCLUDE
# gramps test test/GrampsLogger
# FIXME: This should have run from the current directory, rather than from
# gramps, because there is some test code in that directory.
- GRAMPS_RESOURCES=$TRAVIS_BUILD_DIR/../gramps PYTHONPATH=$TRAVIS_BUILD_DIR/../gramps nosetests3 --exclude=DynamicWeb -vv
# give an error for any trailing whitespace
- if git --no-pager grep --color -n --full-name '[ ]$' -- \*.py; then
echo "ERROR - Trailing whitespace found in source file(s)";
exit 1;
fi