diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index d1cd618..2de1782 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -27,8 +27,9 @@ jobs: matrix: build-opts: - - {python: '3.10', tox: python3.10} - - {python: '3.11', tox: python3.11} + - {python: '3.10', tox: python3} + - {python: '3.11', tox: python3} + - {python: '3.12', tox: python3} - {python: '3.11', tox: pep8} - {python: '3.11', tox: lint} - {python: '3.11', tox: mypy} @@ -57,9 +58,14 @@ jobs: xvfb \ x11-xserver-utils - sudo python -m pip install -U \ + python -m pip install -U --user \ tox + # This is a curated list of packages to get Qt to work with xvfb in + # GitHub actions. https://github.com/tlambert03/setup-qt-libs + - name: Install Qt dependencies + uses: tlambert03/setup-qt-libs@v1 + - name: Cache SELinux userspace uses: actions/cache@v3 id: cache-userspace @@ -79,6 +85,9 @@ jobs: make CFLAGS="-O2 -pipe -fPIC -Wall -I${{env.SEPOL_SRC}}/include" -C ${{env.CHECKPOLICY_SRC}} - name: Run test - run: tox -e ${{ matrix.build-opts.tox }} + run: | + # confirm python version + python --version + python -m tox -e ${{ matrix.build-opts.tox }} env: LD_LIBRARY_PATH: "${{env.SEPOL_SRC}}/src:${{env.SELINUX_SRC}}/src:${LD_LIBRARY_PATH}" diff --git a/tox.ini b/tox.ini index 2e7c6f3..bc4f681 100644 --- a/tox.ini +++ b/tox.ini @@ -15,12 +15,12 @@ commands = pycodestyle setools/ setoolsgui/ tests/ tests-gui/ seinfo sein setenv = SETOOLS_COVERAGE = 1 passenv = {[testenv]passenv} deps = {[testenv]deps} - coverage>=5.0 + coverage>=6.0 extras = toml commands_pre = coverage --version coverage erase {[testenv]commands_pre} -commands = coverage run -m pytest tests tests-gui +commands = coverage run --source=setools,setoolsgui -m pytest tests tests-gui coverage report [testenv:lint] @@ -34,7 +34,7 @@ commands = pylint -E setools setoolsgui tests tests-gui seinfo seinfoflow [testenv:mypy] deps = {[testenv]deps} types-setuptools - mypy + mypy>=1.6.0 commands_pre = mypy --version commands = mypy -p setools -p setoolsgui -p tests -p tests-gui mypy --scripts-are-modules seinfo seinfoflow sedta sesearch sediff sechecker apol