tito/.github/workflows/fedora-tox.yml
Pavel Raiskup 167a91cb4f tests: make the fedora-tox.yml working
This is tricky.  Note the sys.path hack in test/unit/__init__.py where
we intentionally use the Fedora's default Python libraries with a
different Python version selected by Tox.  Right now it means that we
use, e.g., python3-rpm compiled for Python 3.12 (F39) with Python 3.7
(which probably works because Tox is executed as root in the tox
container, overwriting the pre-compiled *.pyc files in container).

Some tests need to be skipped in Tox, therefore the skip_if_tox()
method.

Also, the GitHub's action for 'git checkout' provides somewhat
non-standard environment for Tito to work, hence the fix_tox_env()
configuration method.
2024-11-06 11:19:55 +01:00

48 lines
918 B
YAML

---
on:
push:
branches:
- main
pull_request:
branches:
- main
name: Run Tox tests
jobs:
tox_test:
name: Tox test
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Run Tox tests
id: test
uses: fedora-python/tox-github-action@main
with:
tox_env: ${{ matrix.tox_env }}
dnf_install: >
asciidoc
createrepo_c
docbook-style-xsl
git
git
git-annex
libxslt
python3-bugzilla
python3-rpm
rpm-build
rpmdevtools
rsync
which
strategy:
matrix:
tox_env:
# sync with /tox.ini
- py36
- py37
- py311
- py312
- py313
# Use GitHub's Linux Docker host
runs-on: ubuntu-latest