Update travis.yml so coverage works and also to load pyicu; this entails
moving to the 'trusty' distribution which has Python 3.3 (coverage needs 3.3 or more) and also a Python 3 version of pyicu. This doesn't use the virtualenv at all, so the various pip installs are removed. There are still some minor omissions, noted in FIXMEs; in particular, the code should be tested under Python 3.2 (which is the minimum Gramps requirement).
This commit is contained in:
parent
4e150e5aba
commit
6245d219a9
86
.travis.yml
86
.travis.yml
@ -1,11 +1,39 @@
|
|||||||
|
#
|
||||||
|
# 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:
|
# After changing this file, check it on:
|
||||||
# http://lint.travis-ci.org/
|
# http://lint.travis-ci.org/
|
||||||
|
|
||||||
|
sudo: required
|
||||||
|
dist: trusty
|
||||||
language: python
|
language: python
|
||||||
python:
|
python:
|
||||||
- 3.4
|
- 3.3 # This is irrelevant, because the virtualenv is not used at all
|
||||||
sudo: false
|
|
||||||
cache: pip
|
# 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:
|
addons:
|
||||||
apt:
|
apt:
|
||||||
packages:
|
packages:
|
||||||
@ -23,35 +51,61 @@ addons:
|
|||||||
- python3-dev
|
- python3-dev
|
||||||
- python3-nose
|
- python3-nose
|
||||||
- python3-mock
|
- python3-mock
|
||||||
|
- python3-pyicu
|
||||||
|
- python3-coverage
|
||||||
|
|
||||||
before_install:
|
before_install:
|
||||||
- pip install --upgrade pip
|
|
||||||
- pip install --upgrade setuptools wheel nose coverage codecov
|
|
||||||
|
|
||||||
install:
|
install:
|
||||||
- travis_retry pip install --upgrade pillow
|
# The working directory is set to /home/travis/build/gramps-project/gramps
|
||||||
- travis_retry pip install pyicu==1.8
|
# by the automatic git checkout.
|
||||||
|
|
||||||
# - cd $TRAVIS_BUILD_DIR
|
# Download Sean Ross-Ross's Pure Python module containing a framework to
|
||||||
# $TRAVIS_BUILD_DIR is set to the location of the cloned repository:
|
# manipulate and analyze python astÕs and bytecode. This is loaded to
|
||||||
# for example: /home/travis/build/gramps-project/gramps
|
# /home/travis/build/gramps-project/gramps/meta
|
||||||
|
# FIXME: This should be loaded from the release directory at
|
||||||
|
# https://pypi.python.org/pypi/meta
|
||||||
- git clone -b master https://github.com/srossross/meta
|
- git clone -b master https://github.com/srossross/meta
|
||||||
|
|
||||||
|
# Build Gramps package. This seems to copy everything to
|
||||||
|
# /home/travis/build/scripts-3.3
|
||||||
- python setup.py build
|
- python setup.py build
|
||||||
|
|
||||||
before_script:
|
before_script:
|
||||||
# - sudo Xvfb :99 -ac &
|
# Create the Gramps database directory.
|
||||||
# - export DISPLAY=:99
|
|
||||||
- mkdir -p ~/.gramps/grampsdb/
|
- mkdir -p ~/.gramps/grampsdb/
|
||||||
|
# set PYTHONPATH so the directly installed module (meta) is picked up from
|
||||||
|
# /home/travis/build/gramps-project/gramps/meta
|
||||||
|
- export PYTHONPATH=meta
|
||||||
|
# set module exclusions. --exclude=TestUser because of older version of mock
|
||||||
|
# without configure_mock
|
||||||
|
- export EXCLUDE="--exclude=TestcaseGenerator --exclude=vcard
|
||||||
|
--exclude=merge_ref_test --exclude=user_test --exclude=constfunc_test.py"
|
||||||
|
# set GRAMPS_RESOURCES for locale, data,image and documentation
|
||||||
|
- export GRAMPS_RESOURCES=.
|
||||||
|
|
||||||
script:
|
script:
|
||||||
# --exclude=TestUser because of older version of mock
|
# Ignore the virtualenv entirely. Use nosetests3, python3 (3.4.0) and coverage
|
||||||
# without configure_mock
|
# from /usr/bin. Use libraries from /usr/lib/python3.4,
|
||||||
- PYTHONPATH=meta GRAMPS_RESOURCES=. nosetests3 --nologcapture --with-coverage --cover-package=gramps --exclude=TestcaseGenerator --exclude=vcard --exclude=merge_ref_test --exclude=user_test gramps
|
# /usr/local/lib/python3.4/dist-packages and /usr/lib/python3/dist-packages
|
||||||
|
- nosetests3 --nologcapture --with-coverage --cover-package=gramps $EXCLUDE gramps
|
||||||
|
# FIXME: This should have run from the current directory, rather than from
|
||||||
|
# gramps, because there is some test code in that directory.
|
||||||
|
|
||||||
|
# give an error for any trailing whitespace
|
||||||
- if git --no-pager grep --color -n --full-name '[ ]$' -- \*.py; then
|
- if git --no-pager grep --color -n --full-name '[ ]$' -- \*.py; then
|
||||||
echo "ERROR - Trailing whitespace found in source file(s)";
|
echo "ERROR - Trailing whitespace found in source file(s)";
|
||||||
exit 1;
|
exit 1;
|
||||||
fi
|
fi
|
||||||
|
|
||||||
after_success:
|
after_success:
|
||||||
- codecov
|
# apt-get installs python3-coverage, but codecov only invokes coverage, so make
|
||||||
|
# a link
|
||||||
|
- sudo ln /usr/bin/python3-coverage /usr/bin/coverage
|
||||||
|
|
||||||
|
# We have to use the bash script because the apt-get coverage does not install
|
||||||
|
# codecov. If we used pip to install codecov, it would run inside the
|
||||||
|
# virtualenv, and that doesn't work. Change the path to ensure that codecov
|
||||||
|
# picks up coverage from /usr/bin, rather than from
|
||||||
|
# /home/travis/virtualenv/python3.3.6/bin/
|
||||||
|
- PATH=/usr/bin:$PATH bash <(curl -s https://codecov.io/bash)
|
||||||
|
Loading…
Reference in New Issue
Block a user