Use GitHub Actions to run continuous integration checks
This commit is contained in:
parent
442f696abd
commit
f3e536da6c
76
.github/workflows/gramps-ci.yml
vendored
Normal file
76
.github/workflows/gramps-ci.yml
vendored
Normal file
@ -0,0 +1,76 @@
|
||||
#
|
||||
# Gramps - a GTK+/GNOME based genealogy program
|
||||
#
|
||||
# Copyright (C) 2021 Nick Hall
|
||||
#
|
||||
# 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.
|
||||
|
||||
name: Gramps CI
|
||||
|
||||
on:
|
||||
push:
|
||||
branches: [ master ]
|
||||
pull_request:
|
||||
branches: [ master ]
|
||||
|
||||
jobs:
|
||||
build:
|
||||
|
||||
runs-on: ubuntu-18.04
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
- name: Install dependencies
|
||||
run: |
|
||||
sudo apt-get install gir1.2-pango-1.0
|
||||
sudo apt-get install gir1.2-gtk-3.0
|
||||
sudo apt-get install xdg-utils
|
||||
sudo apt-get install librsvg2-common
|
||||
sudo apt-get install libglib2.0-dev
|
||||
sudo apt-get install intltool
|
||||
sudo apt-get install python3-gi
|
||||
sudo apt-get install python3-cairo
|
||||
sudo apt-get install python3-gi-cairo
|
||||
sudo apt-get install python3-bsddb3
|
||||
sudo apt-get install python3-dev
|
||||
sudo apt-get install python3-nose
|
||||
sudo apt-get install python3-mock
|
||||
sudo apt-get install python3-icu
|
||||
sudo apt-get install python3-coverage
|
||||
sudo apt-get install python3-jsonschema
|
||||
sudo apt-get install libxml2-utils
|
||||
sudo apt-get install python3-lxml
|
||||
sudo apt-get install python-libxml2
|
||||
sudo apt-get install zlib1g-dev
|
||||
sudo apt-get install python3-setuptools
|
||||
- name: Install addons
|
||||
run: |
|
||||
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
|
||||
- name: Build
|
||||
run: |
|
||||
python3 setup.py build
|
||||
- name: Run unit test suite
|
||||
run: |
|
||||
python3 setup.py test
|
||||
- name: Trailing whitespace check
|
||||
run: |
|
||||
if git --no-pager grep --color -n --full-name '[ ]$' -- \*.py; then
|
||||
echo "ERROR - Trailing whitespace found in source file(s)";
|
||||
exit 1;
|
||||
fi
|
14
po/its/appdata.its
Normal file
14
po/its/appdata.its
Normal file
@ -0,0 +1,14 @@
|
||||
<?xml version="1.0"?>
|
||||
<its:rules xmlns:its="http://www.w3.org/2005/11/its"
|
||||
version="2.0">
|
||||
<its:translateRule selector="/component" translate="no"/>
|
||||
<its:translateRule selector="/component/name |
|
||||
/component/summary |
|
||||
/component/description |
|
||||
/component/developer_name |
|
||||
/component/screenshots/screenshot/caption |
|
||||
/component/releases/release/description |
|
||||
/component/agreement/agreement_section/name |
|
||||
/component/agreement/agreement_section/description"
|
||||
translate="yes"/>
|
||||
</its:rules>
|
9
po/its/appdata.loc
Normal file
9
po/its/appdata.loc
Normal file
@ -0,0 +1,9 @@
|
||||
<?xml version="1.0"?>
|
||||
<locatingRules>
|
||||
<locatingRule name="AppData" pattern="*.appdata.xml">
|
||||
<documentRule localName="component" target="appdata.its"/>
|
||||
</locatingRule>
|
||||
<locatingRule name="AppData" pattern="*.metainfo.xml">
|
||||
<documentRule localName="component" target="appdata.its"/>
|
||||
</locatingRule>
|
||||
</locatingRules>
|
4
setup.py
4
setup.py
@ -219,7 +219,9 @@ class test(Command):
|
||||
raise RuntimeError("No build directory. Run `python setup.py build` before trying to run tests.")
|
||||
os.environ['GRAMPS_RESOURCES'] = '.'
|
||||
all_tests = unittest.TestLoader().discover('.', pattern='*_test.py')
|
||||
unittest.TextTestRunner(verbosity=self.verbose).run(all_tests)
|
||||
result = unittest.TextTestRunner(verbosity=self.verbose).run(all_tests)
|
||||
if not result.wasSuccessful():
|
||||
raise SystemExit('ERROR: Unit test failure.')
|
||||
|
||||
#-------------------------------------------------------------------------
|
||||
#
|
||||
|
Loading…
Reference in New Issue
Block a user