Skip to content

Collection and publication of coverage-data#143

Merged
safl merged 8 commits intomainfrom
coverage_collection
Dec 30, 2024
Merged

Collection and publication of coverage-data#143
safl merged 8 commits intomainfrom
coverage_collection

Conversation

@safl
Copy link
Collaborator

@safl safl commented Dec 26, 2024

This is a rebase of #111 on top of main.

@safl safl added the enhancement New feature or request label Dec 26, 2024
@safl safl added this to the v1.0.0 milestone Dec 26, 2024
@safl safl force-pushed the coverage_collection branch 3 times, most recently from 6ebabc4 to 17e1778 Compare December 26, 2024 23:37
@safl safl changed the title Coverage collection Collection and publication of coverage-data Dec 26, 2024
@safl safl force-pushed the coverage_collection branch 4 times, most recently from 5d44f1e to f9396e0 Compare December 27, 2024 21:44
safl and others added 6 commits December 28, 2024 23:18
Signed-off-by: Simon A. F. Lund <os@safl.dk>
Signed-off-by: Simon A. F. Lund <os@safl.dk>
This update modifies the GitHub Actions workflow to integrate code
coverage reporting with Coveralls. It includes steps to collect,
combine, and publish coverage data. The following supporting changes
were also added:

* feat: add config-file for the 'coverage' cli-tool
* feat(git-ignore): add '.coverage' directory to .gitignore

  - The '.coverage' directory is generated by 'coverage'/'coverage.py'
    during unittest runs. Ignoring it prevents accidental inclusion in
    the repository.

* feat(mk/install): add injection of pytest-cov
* feat(mk/test): add use of 'coverage' when running pytest

Signed-off-by: Morten B. Rasmussen <m.rasmussen@samsung.com>
Signed-off-by: Simon A. F. Lund <os@safl.dk>
Signed-off-by: Simon A. F. Lund <os@safl.dk>
Signed-off-by: Simon A. F. Lund <os@safl.dk>
@safl safl force-pushed the coverage_collection branch from f9396e0 to 711ddc9 Compare December 28, 2024 22:18
safl added 2 commits December 29, 2024 23:49
Signed-off-by: Simon A. F. Lund <os@safl.dk>
The coverage.py tool was not tracking cijoe scripts executed via
workflows, leaving a substantial amount of tested code untracked for
coverage.

This issue is similar to one reported previously:

  coveragepy/coveragepy#1002

This commit addresses the problem by ensuring dynamically loaded Python
modules are defined using their full package name. For example, instead
of:

  example_script_default

The full package name is now used:

  cijoe.core.scripts.example_script_default

This change enables proper coverage tracking for these scripts.

Signed-off-by: Simon A. F. Lund <os@safl.dk>
@safl safl merged commit 1aee63c into main Dec 30, 2024
19 checks passed
@safl safl deleted the coverage_collection branch December 30, 2024 12:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants