Skip to content

CI: Generate and collect test and coverage reports

tox.ini:
Generate a Junit xml report to test-reports/junit.xml. Generate
coverage reports test-reports/coverage.xml, test-reports/htmlcov,
and the "TOTAL" line of the report to stdout (for consumption
by gitlab CI).

.pipeline/blubber.yaml:
Changed the 'test' variant so that it runs tox at image build time,
so if the image build completes successfully, tests have passed.
Added test--report variants which copy only the test-reports
directory.

.gitlab-ci.yml:

Changed the test job to use build-image with the
test--report variants, exporting the image to a local
directory when the image completes. The test results (junit.xml) and
coverage report is exported as a GitLab CI artifact for integrated
viewing in MRs.

Makefile:
Remove --quiet flag from the docker build of a test image,
so that the test output can be seen.


Related MRs:

Edited by Ahmon Dancy

Merge request reports