2
0
mirror of https://github.com/inventree/InvenTree.git synced 2025-06-14 11:05:41 +00:00

feat(backend): record contexts for coverage (#9643)

* feat(backend): Record contexts for coverage

* add docs
This commit is contained in:
Matthias Mair
2025-05-07 22:28:06 +02:00
committed by GitHub
parent 34db1a2a49
commit 0b228761b4
3 changed files with 19 additions and 0 deletions

View File

@ -199,6 +199,15 @@ alter user myuser createdb;
!!! info "Devcontainer"
The default database container which is provided in the devcontainer is already setup with the required permissions
### Trace coverage to specific tests
Sometimes it is valuable to get insights how many tests cover a specific statement and which ones do. coverage.py calls this information contexts. Contexts are automatically captured by the invoke task test (with coverage enabled) and can be rendered with below command into a HTML report.
```bash
coverage html -i
```
The coverage database is also generated in the CI-pipeline and exposd for 14 days as a artifact named `coverage`.
## Code Style
Code style is automatically checked as part of the project's CI pipeline on GitHub. This means that any pull requests which do not conform to the style guidelines will fail CI checks.