Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
CloWM S3-Proxy Service
Manage
Activity
Members
Code
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Admin message
Looking for advice? Join the
Matrix channel for GitLab users in Bielefeld
!
This is an archived project. Repository and other project resources are read-only.
Show more breadcrumbs
Computational Metagenomics
CloWM
CloWM S3-Proxy Service
Commits
59984428
Verified
Commit
59984428
authored
2 years ago
by
Daniel Göbel
Browse files
Options
Downloads
Patches
Plain Diff
Fix coverage by merging coverage reports by different test jobs
#9
parent
14ff6f78
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
.gitlab-ci.yml
+24
-9
24 additions, 9 deletions
.gitlab-ci.yml
with
24 additions
and
9 deletions
.gitlab-ci.yml
+
24
−
9
View file @
59984428
...
...
@@ -53,14 +53,12 @@ integration-test-job: # This job runs in the test stage.
-
alembic downgrade base
-
alembic upgrade head
-
pytest --junitxml=integration-report.xml --cov=app --cov-report=term-missing app/tests/crud
-
cd ..
-
coverage xml --data-file=$BASE_DIR/.coverage -o integration-coverage.xml -q
coverage
:
'
/(?i)total.*?
(100(?:\.0+)?\%|[1-9]?\d(?:\.\d+)?\%)$/'
-
mkdir coverage-integration
-
mv .coverage coverage-integration
artifacts
:
paths
:
-
$BASE_DIR/coverage-integration/.coverage
reports
:
coverage_report
:
coverage_format
:
cobertura
path
:
$CI_PROJECT_DIR/integration-coverage.xml
junit
:
$BASE_DIR/integration-report.xml
e2e-test-job
:
# This job runs in the test stage.
...
...
@@ -83,15 +81,32 @@ e2e-test-job: # This job runs in the test stage.
-
alembic downgrade base
-
alembic upgrade head
-
pytest --junitxml=e2e-report.xml --cov=app --cov-report=term-missing app/tests/api
-
mkdir coverage-e2e
-
mv .coverage coverage-e2e
artifacts
:
paths
:
-
$BASE_DIR/coverage-e2e/.coverage
reports
:
junit
:
$BASE_DIR/e2e-report.xml
combine-test-coverage-job
:
# Combine coverage reports from different test jobs
stage
:
test
needs
:
-
job
:
"
e2e-test-job"
artifacts
:
true
-
job
:
"
integration-test-job"
artifacts
:
true
script
:
-
coverage combine coverage-e2e/.coverage coverage-integration/.coverage
-
coverage report
-
cd ..
-
coverage xml --data-file=$BASE_DIR/.coverage -o
e2e-
coverage.xml
-q
-
coverage xml --data-file=$BASE_DIR/.coverage -o coverage.xml
coverage
:
'
/(?i)total.*?
(100(?:\.0+)?\%|[1-9]?\d(?:\.\d+)?\%)$/'
artifacts
:
reports
:
coverage_report
:
coverage_format
:
cobertura
path
:
$CI_PROJECT_DIR/e2e-coverage.xml
junit
:
$BASE_DIR/e2e-report.xml
path
:
$CI_PROJECT_DIR/coverage.xml
lint-test-job
:
# This job also runs in the test stage.
stage
:
test
# It can run at the same time as unit-test-job (in parallel).
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment