2016-08-16 04:13:54 +05:30
|
|
|
|
#
|
|
|
|
|
# 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.
|
|
|
|
|
|
2015-03-13 08:59:10 +05:30
|
|
|
|
# After changing this file, check it on:
|
|
|
|
|
# http://lint.travis-ci.org/
|
|
|
|
|
|
2020-08-23 00:56:13 +05:30
|
|
|
|
os: linux
|
|
|
|
|
dist: xenial
|
2016-01-24 03:35:01 +05:30
|
|
|
|
language: python
|
2016-02-29 04:25:37 +05:30
|
|
|
|
python:
|
2020-09-17 02:02:20 +05:30
|
|
|
|
- 3.5
|
2016-08-16 04:13:54 +05:30
|
|
|
|
|
2016-03-08 10:15:12 +05:30
|
|
|
|
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
|
2020-08-23 01:18:35 +05:30
|
|
|
|
- python3-icu
|
2016-08-16 04:13:54 +05:30
|
|
|
|
- python3-coverage
|
2017-02-18 02:50:49 +05:30
|
|
|
|
- python3-jsonschema
|
2016-12-06 05:30:45 +05:30
|
|
|
|
# lxml dependencies. for merge_ref_test to work
|
|
|
|
|
# - libxml2-dev
|
|
|
|
|
# - libxslt1-dev
|
|
|
|
|
- libxml2-utils
|
|
|
|
|
- python3-lxml
|
|
|
|
|
- python-libxml2
|
|
|
|
|
# ubuntu 14.04 requires this in addition to libxml2-dev and
|
|
|
|
|
# libxslt1-dev for compiling lxml.
|
|
|
|
|
# https://github.com/deanmalmgren/textract/issues/19
|
|
|
|
|
- zlib1g-dev
|
2015-03-13 08:59:10 +05:30
|
|
|
|
|
2016-02-29 04:50:37 +05:30
|
|
|
|
before_install:
|
|
|
|
|
|
2015-03-13 08:59:10 +05:30
|
|
|
|
install:
|
2016-08-16 04:13:54 +05:30
|
|
|
|
# The working directory is set to /home/travis/build/gramps-project/gramps
|
|
|
|
|
# by the automatic git checkout.
|
2016-05-19 06:01:01 +05:30
|
|
|
|
|
2016-08-16 04:13:54 +05:30
|
|
|
|
# Download Sean Ross-Ross's Pure Python module containing a framework to
|
2017-05-24 00:22:19 +05:30
|
|
|
|
# manipulate and analyze python ast<73>s and bytecode. This is loaded to
|
2016-08-16 04:13:54 +05:30
|
|
|
|
# /home/travis/build/gramps-project/gramps/meta
|
|
|
|
|
# FIXME: This should be loaded from the release directory at
|
|
|
|
|
# https://pypi.python.org/pypi/meta
|
2016-04-18 02:24:55 +05:30
|
|
|
|
- git clone -b master https://github.com/srossross/meta
|
2016-08-16 04:13:54 +05:30
|
|
|
|
|
|
|
|
|
# Build Gramps package. This seems to copy everything to
|
|
|
|
|
# /home/travis/build/scripts-3.3
|
2016-03-08 10:15:12 +05:30
|
|
|
|
- python setup.py build
|
|
|
|
|
|
|
|
|
|
before_script:
|
2016-08-16 04:13:54 +05:30
|
|
|
|
# Create the Gramps database directory.
|
2016-03-08 10:15:12 +05:30
|
|
|
|
- mkdir -p ~/.gramps/grampsdb/
|
2016-08-16 04:13:54 +05:30
|
|
|
|
# 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
|
2017-02-23 19:27:57 +05:30
|
|
|
|
- export EXCLUDE="--exclude=TestcaseGenerator"
|
2016-12-06 05:47:54 +05:30
|
|
|
|
# --exclude=merge_ref_test"
|
2016-08-16 04:13:54 +05:30
|
|
|
|
# set GRAMPS_RESOURCES for locale, data,image and documentation
|
|
|
|
|
- export GRAMPS_RESOURCES=.
|
2017-02-28 03:32:51 +05:30
|
|
|
|
# Install addons
|
2020-09-15 21:50:06 +05:30
|
|
|
|
- mkdir -p ~/.gramps/gramps52/plugins/
|
|
|
|
|
- wget https://github.com/gramps-project/addons/raw/master/gramps52/download/CliMerge.addon.tgz
|
|
|
|
|
- tar -C ~/.gramps/gramps52/plugins -xzf CliMerge.addon.tgz
|
|
|
|
|
- wget https://github.com/gramps-project/addons/raw/master/gramps52/download/ExportRaw.addon.tgz
|
|
|
|
|
- tar -C ~/.gramps/gramps52/plugins -xzf ExportRaw.addon.tgz
|
2015-03-15 10:36:09 +05:30
|
|
|
|
|
2015-03-13 08:59:10 +05:30
|
|
|
|
script:
|
2016-08-16 04:13:54 +05:30
|
|
|
|
# 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
|
2016-08-20 01:40:07 +05:30
|
|
|
|
- nosetests3 --nologcapture --with-coverage --cover-package=gramps $EXCLUDE
|
2017-05-09 03:17:38 +05:30
|
|
|
|
gramps
|
2016-08-16 04:13:54 +05:30
|
|
|
|
# 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
|
2016-05-19 06:01:01 +05:30
|
|
|
|
- if git --no-pager grep --color -n --full-name '[ ]$' -- \*.py; then
|
|
|
|
|
echo "ERROR - Trailing whitespace found in source file(s)";
|
|
|
|
|
exit 1;
|
|
|
|
|
fi
|
2016-02-13 18:39:03 +05:30
|
|
|
|
|
|
|
|
|
after_success:
|
2016-08-16 04:13:54 +05:30
|
|
|
|
# apt-get installs python3-coverage, but codecov only invokes coverage, so make
|
|
|
|
|
# a link
|
|
|
|
|
- sudo ln /usr/bin/python3-coverage /usr/bin/coverage
|
2016-02-13 18:39:03 +05:30
|
|
|
|
|
2016-08-16 04:13:54 +05:30
|
|
|
|
# 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)
|
2020-09-03 20:49:58 +05:30
|
|
|
|
|
|
|
|
|
stages:
|
|
|
|
|
- test
|
|
|
|
|
# Only execute deployment stage on tagged commits, and from our repository
|
|
|
|
|
# (e.g. not PRs).
|
|
|
|
|
- name: deploy
|
|
|
|
|
if: tag IS PRESENT AND repo = gramps-project/gramps
|
|
|
|
|
|
|
|
|
|
env:
|
|
|
|
|
global:
|
|
|
|
|
- TWINE_USERNAME=__token__
|
|
|
|
|
|
|
|
|
|
jobs:
|
|
|
|
|
include:
|
|
|
|
|
# Deploy source distribution
|
|
|
|
|
- stage: deploy
|
|
|
|
|
name: Deploy source distribution and wheel
|
|
|
|
|
install: skip
|
2020-09-17 02:03:39 +05:30
|
|
|
|
script:
|
|
|
|
|
- python3 setup.py sdist bdist_wheel
|
|
|
|
|
- python3 -m pip install twine
|
|
|
|
|
- python3 -m twine upload --repository testpypi --skip-existing dist/*
|