Update CI to run unit tests with Python 3.9 and 3.13 #3371
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# | |
# 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: [ maintenance/gramps60 ] | |
pull_request: | |
branches: [ maintenance/gramps60 ] | |
jobs: | |
build: | |
runs-on: ubuntu-22.04 | |
strategy: | |
matrix: | |
python-version: ["3.13"] | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Set up Python ${{ matrix.python-version }} | |
uses: actions/setup-python@v5 | |
with: | |
python-version: ${{ matrix.python-version }} | |
- name: Install dependencies | |
run: | | |
sudo apt-get update | |
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 zlib1g-dev | |
sudo apt-get install libgirepository1.0-dev | |
sudo apt-get install libicu-dev | |
python3 -m pip install --upgrade pip setuptools build wheel | |
python3 -m pip install orjson Pillow PyICU PyGObject pycairo jsonschema mock lxml | |
- name: Install addons | |
run: | | |
mkdir -p ~/.gramps/gramps60/plugins/ | |
wget https://github.com/gramps-project/addons/raw/master/gramps60/download/CliMerge.addon.tgz | |
tar -C ~/.gramps/gramps60/plugins -xzf CliMerge.addon.tgz | |
wget https://github.com/gramps-project/addons/raw/master/gramps60/download/ExportRaw.addon.tgz | |
tar -C ~/.gramps/gramps60/plugins -xzf ExportRaw.addon.tgz | |
- name: Build | |
run: | | |
python3 setup.py build | |
- name: Run mypy static type checker | |
run: | | |
python3 -m pip install mypy | |
mypy gramps test --ignore-missing-imports --exclude '.*gpr\.py$' | |
- name: Run unit test suite | |
run: | | |
export GDK_BACKEND=- | |
export GRAMPS_RESOURCES=. | |
python3 -m unittest discover --durations 0 -p "*_test.py" |