In Plone 5 I used a simple addition to buildout
parts =
coverage
[coverage]
recipe = zc.recipe.egg
eggs = coverage
And then my gitlab yml had something like
script:
- bin/coverage run bin/test -s ims.contacts
- bin/coverage html
- bin/coverage report
In Plone 6 I'm trying to go without zc.buildout, but having an issue. Here's my test script with zope-testrunner which works.
zope-testrunner --test-path=sources/ims.contacts
And the failing coverage script:
coverage run zope-testrunner --test-path=sources/ims.contacts
No file to run: '[full_path_to_instance]\zope-testrunner'
I don't know why it tries to treat it as a path. This is in Windows, but I get a similar error in my gitlab CI/CD which is CentOS Linux. I looked through some packages and comments here and it sounds like running zope-testrunner this way is typical post-buildout, but I haven't seen anything for coverage. I wonder, are people using something else for code coverage these days or maybe eschewing the whole concept? Ultimately it would be nice to have in my Gitlab CI/CD for some projects but it's not really that important.