From 39d721bb8cb6aa0812337f45420601b8299fa669 Mon Sep 17 00:00:00 2001 From: Malthe Borch Date: Mon, 29 Jan 2024 12:26:03 +0100 Subject: [PATCH 1/2] Add 'z3c.macro' and 'z3c.pt' test suites to tox --- .github/workflows/main.yml | 5 +++-- tox.ini | 25 +++++++++++++++++++++++++ 2 files changed, 28 insertions(+), 2 deletions(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 67191fac..780074f7 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -41,8 +41,9 @@ jobs: - ["pypy-3.9", "pypy3"] - ["3.9", "docs"] - ["3.9", "coverage"] - - ["3.12", "mypy"] - + - ["3.12", "mypy"] + - ["3.11", "z3c.macro"] + - ["3.11", "z3c.pt"] runs-on: ${{ matrix.os[1] }} if: github.event_name != 'pull_request' || github.event.pull_request.head.repo.full_name != github.event.pull_request.base.repo.full_name name: ${{ matrix.config[1] }} diff --git a/tox.ini b/tox.ini index a5ec6561..9de3d864 100644 --- a/tox.ini +++ b/tox.ini @@ -12,6 +12,9 @@ envlist = docs coverage mypy + z3c.macro + z3c.pt + [testenv] usedevelop = true deps = @@ -110,3 +113,25 @@ commands = mypy -p chameleon --python-version 3.10 mypy -p chameleon --python-version 3.11 mypy -p chameleon --python-version 3.12 + +[testenv:z3c.macro] +basepython = python3 +skip_install = true +commands_pre = + pip install -e. +usedevelop = true +deps = + z3c.macro[test] +commands = + zope-testrunner --path .tox/z3c.macro/lib/python3.11/site-packages --path . -s z3c.macro {posargs:-vc} + +[testenv:z3c.pt] +basepython = python3 +skip_install = true +commands_pre = + pip install -e. +usedevelop = true +deps = + z3c.pt[test] +commands = + zope-testrunner --path .tox/z3c.pt/lib/python3.11/site-packages --path . -s z3c.pt {posargs:-vc} From b5085c32276005b3181ae6df959922ac05c69c7e Mon Sep 17 00:00:00 2001 From: Malthe Borch Date: Mon, 29 Jan 2024 18:16:36 +0100 Subject: [PATCH 2/2] Use environment variable to substitute in 'site-packages' path --- tox.ini | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tox.ini b/tox.ini index 9de3d864..6c15eb55 100644 --- a/tox.ini +++ b/tox.ini @@ -123,7 +123,7 @@ usedevelop = true deps = z3c.macro[test] commands = - zope-testrunner --path .tox/z3c.macro/lib/python3.11/site-packages --path . -s z3c.macro {posargs:-vc} + zope-testrunner --path {env_site_packages_dir} --path . -s z3c.macro {posargs:-vc} [testenv:z3c.pt] basepython = python3 @@ -134,4 +134,4 @@ usedevelop = true deps = z3c.pt[test] commands = - zope-testrunner --path .tox/z3c.pt/lib/python3.11/site-packages --path . -s z3c.pt {posargs:-vc} + zope-testrunner --path {env_site_packages_dir} --path . -s z3c.pt {posargs:-vc}