@@ -96,27 +96,11 @@ jobs:
96
96
working-directory : ./timefold-solver-python
97
97
run : mvn org.apache.maven.plugins:maven-dependency-plugin:2.8:get -Dartifact=org.jacoco:org.jacoco.agent:0.8.11:jar:runtime -Ddest=target/jacocoagent.jar
98
98
- name : Run tox to measure timefold solver python code coverage from Python tests
99
- continue-on-error : true # Sometimes the JVM segfaults on SUCCESSFUL tests with Java 17 (and always with Java 11)
100
99
working-directory : ./timefold-solver-python
101
100
run : python -m tox -- --cov=timefold --cov-report=xml:target/coverage.xml --cov-config=tox.ini --cov-branch --cov-append --jacoco-agent=./target/jacocoagent.jar
102
101
- name : Run tox to measure jpyinterpreter code coverage from Python tests
103
- continue-on-error : true # Sometimes the JVM segfaults on SUCCESSFUL tests with Java 17 (and always with Java 11)
104
102
working-directory : ./timefold-solver-python/jpyinterpreter
105
103
run : python -m tox -- --cov=jpyinterpreter --cov-report=xml:target/coverage.xml --cov-config=tox.ini --cov-branch --cov-append --jacoco-agent=../target/jacocoagent.jar --jacoco-output=../target/jacoco.exec
106
- # Because we are using JPype, and JPype add it own import hook, we need to use --import-mode=importlib in pytest
107
- # This seems to create an issue in test coverage, where it reports coverage inside the tox virtual environment,
108
- # instead of coverage inside sources. For instance, for a package, it will report:
109
- # package name=".tox.py39.lib.python3.9.site-packages.jpyinterpreter"
110
- # and for a file it will report:
111
- # class name="jvm_setup.py" filename=".tox/py39/lib/python3.9/site-packages/jpyinterpreter/jvm_setup.py"
112
- # We need to convert the package and file names into their true names; i.e. for the example above:
113
- # package name="jpyinterpreter"
114
- # class name="jvm_setup.py" filename="jpyinterpreter/src/main/python/jvm_setup.py"
115
- # fix-coverage-paths.py is a Python script that does the above transformation for us and merge the two
116
- # separate coverage files into one.
117
- - name : Fix Python test coverage paths
118
- working-directory : ./timefold-solver-python
119
- run : python fix-coverage-paths.py
120
104
- name : Run SonarCloud analysis
121
105
working-directory : ./timefold-solver-python
122
106
env :
0 commit comments