Skip to content

Conversation

msom
Copy link
Contributor

@msom msom commented Jun 12, 2025

Adds test-coverage (for local usage) and test-ci (for pipeline) which run the test and create coverage reports.

There was no way to get consistent reports with coverage and django's test runner (it seems like somehow the duplicate 09/10 tests are getting mixed up). Using the already installed pytest on the other hand works like a charm.

Next step would be to change the builder pipeline similar to service-control (this commit). This will show the coverage in the CodeBuild Report (example).

@msom msom requested review from schtibe and ltshb June 12, 2025 14:56
Copy link
Contributor

@ltshb ltshb left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍🏼

Comment on lines +226 to +230
.PHONY: test-ci
test-ci:
# Collect static first to avoid warning in the test
$(PYTHON) $(DJANGO_MANAGER) collectstatic --noinput
$(PYTEST) -n 20 --cov --cov-report=xml
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do you also intend to update the CI ?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, as soon as this is merged I'll create a PR

Copy link
Contributor

@schtibe schtibe left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@msom msom merged commit e9644fa into develop Jun 17, 2025
3 checks passed
@msom msom deleted the feat-PB-1764-coverage-report branch June 17, 2025 04:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants