It is a bit trickier with system roles. We use
instead of using the `coveralls` command directly. Not sure why we used a
custom python script using the coveralls api, rather than using the
`coveralls` command directly.
On Wed, Jul 21, 2021 at 1:40 PM Jiri Kucera <jkucera(a)redhat.com> wrote:
Hello,
those that are using tox for testing system roles and send the test
coverage reports to coveralls.io via coveralls pypi package may struggle
with empty code view in coveralls.io web UI (see network role view for
example[1]).
Since 3.1.0, coveralls has introduced the --basedir option. This option
allows you to strip the base directory from reported paths. To demonstrate
it on network role, if coveralls is run with
$ coveralls --basedir=/home/runner/work/network/network
the reported path will be library/network_connections.py, which is the
existing path on GitHub[2], so the coveralls.io should be able to display
a view showing the lines covered.
Sometimes, sources can be placed inside src/ (or similar) directory. This
can be seen in several pure Python packages. To handle these kind of
situations, PR with --srcdir option support was opened and merged[3]
recently.
This option allow to specify the directory with sources relative to GitHub
project so coveralls.io is able to see them.
Regards
Jiri
[1]
https://coveralls.io/builds/41496934/source?filename=%2Fhome%2Frunner%2Fw...
[2]
https://github.com/linux-system-roles/network/blob/main/library/network_c...
[3]
https://github.com/TheKevJames/coveralls-python/pull/306
_______________________________________________
systemroles mailing list -- systemroles(a)lists.fedorahosted.org
To unsubscribe send an email to systemroles-leave(a)lists.fedorahosted.org
Fedora Code of Conduct:
https://docs.fedoraproject.org/en-US/project/code-of-conduct/
List Guidelines:
https://fedoraproject.org/wiki/Mailing_list_guidelines
List Archives:
https://lists.fedorahosted.org/archives/list/systemroles@lists.fedorahost...
Do not reply to spam on the list, report it:
https://pagure.io/fedora-infrastructure