Skip to content
Snippets Groups Projects
Commit f0eb80b4 authored by Clément Jonglez's avatar Clément Jonglez
Browse files

CI: split test and coverage stages, install pytest-cov and coverage

parent 975a642c
No related branches found
No related tags found
1 merge request!15Fix coverage in CI pipeline
Pipeline #5872 passed
......@@ -38,7 +38,7 @@ flake8:
codequality: gl-code-quality-report.json
expire_in: 1 month
test-and-coverage:
test:
stage: test
image: python:$PYTHON_VERSION-bookworm
parallel:
......@@ -50,10 +50,23 @@ test-and-coverage:
- python3 -m pip install .
- cd test
- python3 -m pytest PyhelpersTest.py # First test setup_orekit_data without the orekitdata library
- pip install git+https://gitlab.orekit.org/orekit/orekit-data.git
- python3 -m pytest --cov=orekit_jpype --cov-report term --cov-report xml:coverage.xml
- python3 -m pip install git+https://gitlab.orekit.org/orekit/orekit-data.git
- python3 -m pytest
- cd ../tests-jvm
- find . -name "*.py" -exec python3 -m pytest {} \;
coverage:
stage: test
image: python:3.11-bookworm
script:
- source venv/bin/activate
- export JAVA_HOME=`python3 set_java_home.py`
- python3 -m pip install .
- cd test
- python3 -m pip install git+https://gitlab.orekit.org/orekit/orekit-data.git
- python3 -m pytest --cov --cov-report term --cov-report xml:coverage.xml
coverage: '/(?i)total.*? (100(?:\.0+)?\%|[1-9]?\d(?:\.\d+)?\%)$/'
artifacts:
reports:
coverage_report:
......
......@@ -39,6 +39,8 @@ forum = "https://forum.orekit.org/c/orekit-python-wrapper-usage/17"
[project.optional-dependencies]
tests = [
"pytest",
"coverage",
"pytest-cov"
]
[pytest]
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment