Infrastructures axonometric graphical representations #64
Workflow file for this run
This file contains hidden or 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
--- | |
name: Automated Tests | |
on: | |
push: | |
branches: | |
- main | |
pull_request: | |
branches: | |
- main | |
workflow_dispatch: {} | |
jobs: | |
tests: | |
name: Python tests | |
strategy: | |
matrix: | |
os: ["ubuntu-latest"] | |
python-version: ["3.8", "3.9", "3.10", "3.11", "3.12", "3.13"] | |
include: | |
- os: "ubuntu-20.04" | |
python-version: "3.6" | |
- os: "ubuntu-22.04" | |
python-version: "3.7" | |
runs-on: ${{ matrix.os }} | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Set up Python | |
uses: actions/setup-python@v5 | |
with: | |
python-version: ${{ matrix.python-version }} | |
- name: Install tests dependencies | |
run: | | |
sudo apt-get update | |
sudo apt-get install -y build-essential libcairo2-dev libgirepository1.0-dev libpango1.0-dev | |
python -m pip install --upgrade pip | |
- name: Install application with its dependencies | |
if: ${{ matrix.python-version != '3.6' }} | |
run: | | |
pip install . .[web] .[tests] | |
# Unfortunately, pip and setuptools in Python 3.6 do not fully support | |
# PEP517 pyproject.toml. As a workaround for this version, the setup.py | |
# script provided by RFL.build package is copied and executed. | |
# | |
# Some dependencies are pre-installed to add version constraints, in order | |
# to force installation of old versions compatible with Python 3.6. | |
# | |
# Some RacksDB optional dependencies are declared in extra packages. | |
# This is not supported by setup.py script from RFL.build. As a workaround | |
# these dependencies are installed manually afterwhile. | |
- name: Install application with its dependencies (Python 3.6) | |
if: ${{ matrix.python-version == '3.6' }} | |
run: | | |
echo "::notice::Installing RFL.build" | |
pip install RFL.build | |
echo "::notice::Installing PyYAML (old version)" | |
pip install PyYAML==5.4.1 | |
echo "::notice::Installing PyGObject (old version)" | |
pip install "PyGObject<3.43.0" | |
echo "::notice::Installing Werkzeug (old version)" | |
pip install "Werkzeug<0.13" | |
echo "::notice::Installing Flask (old version)" | |
pip install "flask<1.0" | |
echo "::notice::Installing requests-toolbelt (old version)" | |
pip install requests-toolbelt==0.9.1 | |
echo "::notice::Installing parameterized" | |
pip install parameterized | |
cp -v ${Python3_ROOT_DIR}/lib/python3.6/site-packages/rfl/build/scripts/setup setup.py | |
python3 setup.py install | |
echo "::notice::Installing optional dependencies required for tests" | |
pip install pytest | |
# The cached_property decorator is integrated in Python 3.8+. For older | |
# versions, install cached_property external library. | |
# On Python 3.8+, RacksDB uses importlib.metadata in standard library to | |
# retrieve the version of the package. For older versions, install | |
# importlib_metadata external backport library, and explicitely force the | |
# old version available in RHEL8. | |
- if: ${{ matrix.python-version == '3.6' || matrix.python-version == '3.7' }} | |
run: pip install cached_property "importlib-metadata==0.23" | |
- name: Run tests | |
run: pytest |