Fix the test suite #310
Workflow file for this run
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
# Run unit tests script | |
name: Unit Tests | |
on: | |
push: | |
branches: [ master ] | |
pull_request: | |
branches: [ master ] | |
jobs: | |
build: | |
runs-on: ubuntu-22.04 | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Set up Python 3.10 | |
uses: actions/setup-python@v5 | |
with: | |
python-version: "3.8" | |
cache: 'pip' | |
- name: Install dependencies | |
run: | | |
python -m pip install --upgrade pip | |
sudo apt-get update | |
sudo apt install -y meson gettext itstool libgirepository1.0-dev gir1.2-gtk-4.0 libgtksourceview-5-dev | |
pip install --user -e git+https://github.com/getting-things-gnome/liblarch.git#egg=liblarch | |
pip install --user pytest pycairo PyGObject caldav lxml | |
- name: Build and install GTG | |
run: | | |
meson setup ./build | |
cd build | |
meson compile | |
sudo meson install | |
- name: Run unit tests with Pytest | |
run: | | |
mkdir dummydir | |
# Change to dummy directory to prevent adding the source root to sys.path | |
cd dummydir | |
PYTHONPATH=/usr/local/lib/python3.8/site-packages pytest ../tests |