@@ -7,12 +7,21 @@ min_version = 4.4.0
77envlist =
88 lint
99 test
10+ py313-plone62
11+ py312-plone62
12+ py311-plone62
13+ py310-plone62
1014 dependencies
1115
1216
1317# #
1418# Add extra configuration options in .meta.toml:
19+ # - to specify a custom testing combination of Plone and python versions, use `test_matrix`
20+ # Use ["*"] to use all supported Python versions for this Plone version.
21+ # - to specify extra custom environments, use `envlist_lines`
22+ # - to specify extra `tox` top-level options, use `config_lines`
1523# [tox]
24+ # test_matrix = {"6.2" = ["3.13", "3.12"], "6.1" = ["*"]}
1625# envlist_lines = """
1726# my_other_environment
1827# """
@@ -21,32 +30,14 @@ envlist =
2130# """
2231# #
2332
24- [testenv]
25- skip_install = true
26- allowlist_externals =
27- echo
28- false
29- # Make sure typos like `tox -e formaat` are caught instead of silently doing nothing.
30- # See https://github.com/tox-dev/tox/issues/2858.
31- commands =
32- echo " Unrecognized environment name {envname}"
33- false
34-
35- # #
36- # Add extra configuration options in .meta.toml:
37- # [tox]
38- # testenv_options = """
39- # basepython = /usr/bin/python3.8
40- # """
41- # #
42-
4333[testenv:init]
4434description = Prepare environment
4535skip_install = true
36+ allowlist_externals =
37+ echo
4638commands =
4739 echo " Initial setup complete"
4840
49-
5041[testenv:format]
5142description = automatically reformat code
5243skip_install = true
@@ -87,8 +78,21 @@ deps =
8778commands =
8879 sh -c ' pipdeptree --exclude setuptools,wheel,pipdeptree,zope.interface,zope.component --graph-output svg > dependencies.svg'
8980
90- [testenv:test]
91- description = run the distribution tests
81+
82+ [test_runner]
83+ deps = zope.testrunner
84+ test =
85+ rfbrowser init
86+ zope-testrunner --all --test-path ={toxinidir}/src -s plone.app.robotframework {posargs}
87+ coverage =
88+ rfbrowser init
89+ coverage run --branch --source plone.app.robotframework {envbindir}/zope-testrunner --quiet --all --test-path ={toxinidir}/src -s plone.app.robotframework {posargs}
90+ coverage report -m --format markdown
91+ coverage xml
92+ coverage html
93+
94+ [base]
95+ description = shared configuration for tests and coverage
9296use_develop = true
9397skip_install = false
9498constrain_package_deps = true
@@ -104,64 +108,80 @@ set_env =
104108#
105109# Set constrain_package_deps .meta.toml:
106110# [tox]
107- # constrain_package_deps = " false"
111+ # constrain_package_deps = false
108112# #
109113deps =
110- zope.testrunner
111- -c https://dist.plone.org/release/6.0 -dev/constraints.txt
114+ {[test_runner]deps}
115+ plone62: -c https://dist.plone.org/release/6.2 -dev/constraints.txt
112116
113117# #
114118# Specify additional deps in .meta.toml:
115119# [tox]
116- # test_deps_additional = "-esources/plonegovbr.portal_base[test]"
120+ # test_deps_additional = """
121+ # -esources/plonegovbr.portal_base[test]
122+ # """
117123#
118124# Specify a custom constraints file in .meta.toml:
119125# [tox]
120126# constraints_file = "https://my-server.com/constraints.txt"
121127# #
122- commands =
123- rfbrowser init
124- zope-testrunner --all --test-path ={toxinidir}/src -s plone.app.robotframework {posargs}
125128extras =
126129 test
127130
131+
128132# #
129133# Add extra configuration options in .meta.toml:
130134# [tox]
131135# test_extras = """
132136# tests
133137# widgets
134138# """
139+ #
140+ # Add extra configuration options in .meta.toml:
141+ # [tox]
142+ # testenv_options = """
143+ # basepython = /usr/bin/python3.8
144+ # """
135145# #
136146
147+ [testenv:test]
148+ description = run the distribution tests
149+ use_develop = {[base]use_develop}
150+ skip_install = {[base]skip_install}
151+ constrain_package_deps = {[base]constrain_package_deps}
152+ set_env = {[base]set_env}
153+ deps =
154+ {[test_runner]deps}
155+ -c https://dist.plone.org/release/6.2-dev/constraints.txt
156+
157+ commands = {[test_runner]test}
158+ extras = {[base]extras}
159+
160+
161+ [testenv]
162+ description = run the distribution tests (generative environments)
163+ use_develop = {[base]use_develop}
164+ skip_install = {[base]skip_install}
165+ constrain_package_deps = {[base]constrain_package_deps}
166+ set_env = {[base]set_env}
167+ deps = {[base]deps}
168+ commands = {[test_runner]test}
169+ extras = {[base]extras}
170+
171+
137172[testenv:coverage]
138173description = get a test coverage report
139- use_develop = true
140- skip_install = false
141- constrain_package_deps = true
142- set_env =
143- ROBOT_BROWSER =headlesschrome
144-
145- # #
146- # Specify extra test environment variables in .meta.toml:
147- # [tox]
148- # test_environment_variables = """
149- # PIP_EXTRA_INDEX_URL=https://my-pypi.my-server.com/
150- # """
151- # #
174+ use_develop = {[base]use_develop}
175+ skip_install = {[base]skip_install}
176+ constrain_package_deps = {[base]constrain_package_deps}
177+ set_env = {[base]set_env}
152178deps =
179+ {[test_runner]deps}
153180 coverage
154- zope.testrunner
155- -c https://dist.plone.org/release/6.0-dev/constraints.txt
181+ -c https://dist.plone.org/release/6.2-dev/constraints.txt
156182
157- commands =
158- rfbrowser init
159- coverage run --branch --source plone.app.robotframework {envbindir}/zope-testrunner --quiet --all --test-path ={toxinidir}/src -s plone.app.robotframework {posargs}
160- coverage report -m --format markdown
161- coverage xml
162- coverage html
163- extras =
164- test
183+ commands = {[test_runner]coverage}
184+ extras = {[base]extras}
165185
166186
167187[testenv:release-check]
@@ -171,8 +191,7 @@ deps =
171191 twine
172192 build
173193 towncrier
174- -c https://dist.plone.org/release/6.0-dev/constraints.txt
175-
194+ -c https://dist.plone.org/release/6.2-dev/constraints.txt
176195commands =
177196 # fake version to not have to install the package
178197 # we build the change log as news entries might break
@@ -202,8 +221,7 @@ allowlist_externals =
202221deps =
203222 pipdeptree
204223 pipforester
205- -c https://dist.plone.org/release/6.0-dev/constraints.txt
206-
224+ -c https://dist.plone.org/release/6.2-dev/constraints.txt
207225commands =
208226 # Generate the full dependency tree
209227 sh -c ' pipdeptree -j > forest.json'
0 commit comments