Contributors mailing list archives

contributors@odoo-community.org

Browse archives

Avatar

Issue with ir.actions.server in Coverage Report – Curious About Others' Experience

by
BizzAppDev Systems Pvt. Ltd, Ruchir Shukla.
- 25/02/2025 16:51:42

Dear OCA Community,

I am using https://github.com/oca/oca-ci to run automated test cases in my GitLab pipeline, and I encountered a strange issue today.

In one of the modules in my current repository, I am creating a Server Action (ir.actions.server) and executing it via the run method. However, during test execution, coverage.py mistakenly treated ir.actions.server as a file (might be because it is using safe_eval) and attempted to include it in the .coverage report. This resulted in the following error while generating coverage report:

No source for code: '/builds/GIT_REPO/ir.actions.server(576,)'.

I was able to resolve this by adding a .coveragerc file with the following configuration:

[run]
omit =
    *ir.actions.server*

While this fix works, I am curious to know if others have encountered a similar issue, how it has been handled in other setups, and whether my solution is the proper way to address it.

Looking forward to insights!

BizzAppDev
Erudite of Business Solutions
With Kind Regards,
Ruchir Y Shukla
Founder & CTO
BizzAppDev Systems Pvt. Ltd.
M:
+91 98 980 78748
W:
E:
ruchir@bizzappdev.com

Book time to meet with me