Skip to content
Snippets Groups Projects
Commit 29f27392 authored by Jithu Murugan's avatar Jithu Murugan
Browse files

- Updated .gitlab-ci.yml to include new separate stages testing and also for the coverage.

parent 189e0d73
No related branches found
No related tags found
2 merge requests!6ci(dedal): implement coverage calculation for the library,!4feat(spack_operation): implement setup_spack_env functionality
Pipeline #59639 failed with stages
in 1 minute and 6 seconds
stages: stages:
- test - test
- build - build
- coverage_report
variables: variables:
BUILD_ENV_DOCKER_IMAGE: docker-registry.ebrains.eu/esd/tmp:latest BUILD_ENV_DOCKER_IMAGE: docker-registry.ebrains.eu/esd/tmp:latest
...@@ -21,23 +22,60 @@ build-wheel: ...@@ -21,23 +22,60 @@ build-wheel:
- dist/*.tar.gz - dist/*.tar.gz
expire_in: 1 week expire_in: 1 week
unit_tests:
testing-pytest-coverage:
stage: test stage: test
tags: tags:
- docker-runner - docker-runner
image: ubuntu:22.04 image: ubuntu:22.04
before_script:
- chmod +x dedal/utils/bootstrap.sh
- ./dedal/utils/bootstrap.sh
- pip install -e .[test]
script: script:
- coverage run s --tb=short --junitxml=test-results.xml -m pytest ./dedal/tests/unit_tests
- coverage xml -o coverage_unit.xml
artifacts:
paths:
- coverage_unit.xml
expire_in: 1 week
integration_tests:
stage: test
tags:
- docker-runner
image: ubuntu:22.04
before_script:
- chmod +x dedal/utils/bootstrap.sh - chmod +x dedal/utils/bootstrap.sh
- ./dedal/utils/bootstrap.sh - ./dedal/utils/bootstrap.sh
- pip install -e .[test] - pip install -e .[test]
- coverage run -m pytest -s --tb=short --junitxml=test-results.xml ./dedal/tests/ && coverage html -i -d htmlcov script:
- coverage run s --tb=short --junitxml=test-results.xml -m pytest ./dedal/tests/integration_tests
- coverage xml -o coverage_integration.xml
artifacts:
paths:
- coverage_integration.xml
expire_in: 1 week
merge_coverage:
stage: coverage_report
tags:
- docker-runner
image: ubuntu:22.04
before_script:
- pip install coverage
script:
- coverage combine coverage_unit.xml coverage_integration.xml
- coverage report
- coverage xml -o coverage.xml
- coverage html -d coverage_html
artifacts: artifacts:
when: always
reports: reports:
junit: test-results.xml coverage_report:
coverage_format: cobertura
path: coverage.xml
paths: paths:
- test-results.xml - coverage.xml
- .dedal.log - coverage_html
expire_in: 1 week expire_in: 1 week
coverage: '/TOTAL.*?(\d+\%)$/'
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment