code coverage needs to run only for JACOCO PROFILE (#4230)
* code coverage needs to run only for JACOCO PROFILE * remove ALLMODULES profile since it is default now
This commit is contained in:
parent
1b55f49a60
commit
27ec3bec79
|
@ -11,7 +11,7 @@ import java.util.HashMap;
|
|||
import java.util.Map;
|
||||
|
||||
/**
|
||||
* mvn -P CI,ALLMODULES checkstyle:check
|
||||
* mvn -P CI checkstyle:check
|
||||
*/
|
||||
@StatelessCheck
|
||||
public final class HapiErrorCodeCheck extends AbstractCheck {
|
||||
|
|
|
@ -41,7 +41,7 @@ Failed to execute goal org.apache.maven.plugins:maven-surefire-plugin:2.19.1:tes
|
|||
This typically means that your build is running out of memory. HAPI's unit tests execute by default in multiple threads (the thread count is determined by the number of CPU cores available) so in an environment with lots of cores but not enough RAM, you may run out. If you are getting this error, try executing the build with the following arguments:
|
||||
|
||||
```
|
||||
mvn -P ALLMODULES,NOPARALLEL install
|
||||
mvn -P NOPARALLEL install
|
||||
```
|
||||
|
||||
See [Hacking HAPI FHIR](/docs/contributing/hacking_guide.html) for more information on the build process.
|
||||
|
|
|
@ -66,7 +66,7 @@ If the build fails to execute successfully, try the following:
|
|||
* If the build fails with memory issues (or mysteriously dies during unit tests), your build environment may be running out of memory. By default, the HAPI build executes unit tests in multiple parallel JVMs in order to save time. This can consume a lot of RAM and sometimes causes issues. Try executing with the following command to disable this behaviour:
|
||||
|
||||
```bash
|
||||
mvn -P ALLMODULES,NOPARALLEL install
|
||||
mvn -P NOPARALLEL install
|
||||
```
|
||||
|
||||
* If you figure something else out, please <b>let us know</b> so that we can add it to this list!
|
||||
|
|
|
@ -17,9 +17,41 @@
|
|||
|
||||
<artifactId>hapi-fhir-jacoco</artifactId>
|
||||
<packaging>jar</packaging>
|
||||
|
||||
<name>HAPI FHIR - JaCoCo Test Coverage</name>
|
||||
|
||||
<profiles>
|
||||
<profile>
|
||||
<id>JACOCO</id>
|
||||
<activation>
|
||||
<activeByDefault>false</activeByDefault>
|
||||
</activation>
|
||||
<build>
|
||||
<plugins>
|
||||
<plugin>
|
||||
<groupId>org.jacoco</groupId>
|
||||
<artifactId>jacoco-maven-plugin</artifactId>
|
||||
<executions>
|
||||
<execution>
|
||||
<id>post-integration-test</id>
|
||||
<phase>verify</phase>
|
||||
<goals>
|
||||
<goal>report-aggregate</goal>
|
||||
</goals>
|
||||
<configuration>
|
||||
<outputDirectory>${project.reporting.outputDirectory}/jacoco-report</outputDirectory>
|
||||
</configuration>
|
||||
</execution>
|
||||
</executions>
|
||||
</plugin>
|
||||
<plugin>
|
||||
<groupId>org.apache.maven.plugins</groupId>
|
||||
<artifactId>maven-checkstyle-plugin</artifactId>
|
||||
<configuration>
|
||||
<skip>true</skip>
|
||||
</configuration>
|
||||
</plugin>
|
||||
</plugins>
|
||||
</build>
|
||||
<dependencies>
|
||||
<dependency>
|
||||
<groupId>ca.uhn.hapi.fhir</groupId>
|
||||
|
@ -121,16 +153,14 @@
|
|||
<artifactId>hapi-fhir-jpaserver-test-r5</artifactId>
|
||||
<version>${project.version}</version>
|
||||
</dependency>
|
||||
|
||||
<!-- TODO KHS temporarily disable these tests because they are blocking ci
|
||||
|
||||
<dependency>
|
||||
<groupId>ca.uhn.hapi.fhir</groupId>
|
||||
<artifactId>hapi-fhir-jpaserver-elastic-test-utilities</artifactId>
|
||||
<version>${project.version}</version>
|
||||
</dependency>
|
||||
-->
|
||||
|
||||
<!-- TODO KHS temporarily disable these tests because they are blocking ci -->
|
||||
<!--
|
||||
<dependency>
|
||||
<groupId>ca.uhn.hapi.fhir</groupId>
|
||||
<artifactId>hapi-fhir-jpaserver-elastic-test-utilities</artifactId>
|
||||
<version>${project.version}</version>
|
||||
</dependency>
|
||||
-->
|
||||
<dependency>
|
||||
<groupId>ca.uhn.hapi.fhir</groupId>
|
||||
<artifactId>hapi-fhir-client-okhttp</artifactId>
|
||||
|
@ -162,35 +192,6 @@
|
|||
<version>${project.version}</version>
|
||||
</dependency>
|
||||
</dependencies>
|
||||
|
||||
<properties>
|
||||
</properties>
|
||||
|
||||
<build>
|
||||
<plugins>
|
||||
<plugin>
|
||||
<groupId>org.jacoco</groupId>
|
||||
<artifactId>jacoco-maven-plugin</artifactId>
|
||||
<executions>
|
||||
<execution>
|
||||
<id>post-integration-test</id>
|
||||
<phase>verify</phase>
|
||||
<goals>
|
||||
<goal>report-aggregate</goal>
|
||||
</goals>
|
||||
<configuration>
|
||||
<outputDirectory>${project.reporting.outputDirectory}/jacoco-report</outputDirectory>
|
||||
</configuration>
|
||||
</execution>
|
||||
</executions>
|
||||
</plugin>
|
||||
<plugin>
|
||||
<groupId>org.apache.maven.plugins</groupId>
|
||||
<artifactId>maven-checkstyle-plugin</artifactId>
|
||||
<configuration>
|
||||
<skip>true</skip>
|
||||
</configuration>
|
||||
</plugin>
|
||||
</plugins>
|
||||
</build>
|
||||
</profile>
|
||||
</profiles>
|
||||
</project>
|
||||
|
|
2
lgtm.yml
2
lgtm.yml
|
@ -6,5 +6,5 @@ extraction:
|
|||
maven:
|
||||
version: 3.8.4
|
||||
build_command:
|
||||
- mvn -P ALLMODULES,LGTM -Dmaven.test.skip install
|
||||
- mvn -P LGTM -Dmaven.test.skip install
|
||||
|
||||
|
|
137
pom.xml
137
pom.xml
|
@ -57,6 +57,68 @@
|
|||
</repository>
|
||||
</repositories>
|
||||
|
||||
<modules>
|
||||
<module>hapi-fhir-checkstyle</module>
|
||||
<module>hapi-fhir-bom</module>
|
||||
<module>hapi-deployable-pom</module>
|
||||
<module>hapi-fhir-base</module>
|
||||
<module>hapi-fhir-docs</module>
|
||||
<module>hapi-fhir-test-utilities</module>
|
||||
<module>hapi-fhir-jpaserver-test-utilities</module>
|
||||
<module>hapi-fhir-jpaserver-test-dstu2</module>
|
||||
<module>hapi-fhir-jpaserver-test-dstu3</module>
|
||||
<module>hapi-fhir-jpaserver-test-r4</module>
|
||||
<module>hapi-fhir-jpaserver-test-r4b</module>
|
||||
<module>hapi-fhir-jpaserver-test-r5</module>
|
||||
<module>hapi-fhir-jpaserver-elastic-test-utilities</module>
|
||||
<module>hapi-tinder-plugin</module>
|
||||
<module>hapi-tinder-test</module>
|
||||
<module>hapi-fhir-client</module>
|
||||
<module>hapi-fhir-server</module>
|
||||
<module>hapi-fhir-server-mdm</module>
|
||||
<module>hapi-fhir-server-openapi</module>
|
||||
<module>hapi-fhir-converter</module>
|
||||
<module>hapi-fhir-validation</module>
|
||||
<module>hapi-fhir-structures-dstu2</module>
|
||||
<module>hapi-fhir-structures-hl7org-dstu2</module>
|
||||
<module>hapi-fhir-validation-resources-dstu2</module>
|
||||
<module>hapi-fhir-structures-dstu2.1</module>
|
||||
<module>hapi-fhir-validation-resources-dstu2.1</module>
|
||||
<module>hapi-fhir-structures-dstu3</module>
|
||||
<module>hapi-fhir-validation-resources-dstu3</module>
|
||||
<module>hapi-fhir-structures-r4</module>
|
||||
<module>hapi-fhir-validation-resources-r4</module>
|
||||
<module>hapi-fhir-structures-r4b</module>
|
||||
<module>hapi-fhir-structures-r5</module>
|
||||
<module>hapi-fhir-validation-resources-r5</module>
|
||||
<module>hapi-fhir-jpa</module>
|
||||
<module>hapi-fhir-storage</module>
|
||||
<module>hapi-fhir-storage-batch2</module>
|
||||
<module>hapi-fhir-storage-batch2-jobs</module>
|
||||
<module>hapi-fhir-storage-mdm</module>
|
||||
<module>hapi-fhir-storage-test-utilities</module>
|
||||
<module>hapi-fhir-jpaserver-cql</module>
|
||||
<module>hapi-fhir-jpaserver-model</module>
|
||||
<module>hapi-fhir-jpaserver-searchparam</module>
|
||||
<module>hapi-fhir-jpaserver-subscription</module>
|
||||
<module>hapi-fhir-jaxrsserver-base</module>
|
||||
<module>hapi-fhir-batch</module>
|
||||
<module>hapi-fhir-jpaserver-base</module>
|
||||
<module>hapi-fhir-sql-migrate</module>
|
||||
<module>hapi-fhir-jpaserver-mdm</module>
|
||||
<module>hapi-fhir-testpage-overlay</module>
|
||||
<module>hapi-fhir-jpaserver-uhnfhirtest</module>
|
||||
<module>hapi-fhir-client-okhttp</module>
|
||||
<module>hapi-fhir-android</module>
|
||||
<module>hapi-fhir-cli</module>
|
||||
<module>hapi-fhir-dist</module>
|
||||
<module>tests/hapi-fhir-base-test-jaxrsserver-kotlin</module>
|
||||
<module>tests/hapi-fhir-base-test-mindeps-client</module>
|
||||
<module>tests/hapi-fhir-base-test-mindeps-server</module>
|
||||
<module>hapi-fhir-spring-boot</module>
|
||||
<module>hapi-fhir-jacoco</module>
|
||||
</modules>
|
||||
|
||||
<dependencies>
|
||||
<dependency>
|
||||
<groupId>org.junit.jupiter</groupId>
|
||||
|
@ -873,6 +935,9 @@
|
|||
<maven.compiler.testSource>17</maven.compiler.testSource>
|
||||
<maven.compiler.testTarget>17</maven.compiler.testTarget>
|
||||
<maven.compiler.testRelease>17</maven.compiler.testRelease>
|
||||
|
||||
<!-- Jacoco -->
|
||||
<argLine></argLine>
|
||||
</properties>
|
||||
|
||||
<dependencyManagement>
|
||||
|
@ -2594,6 +2659,8 @@
|
|||
</execution>
|
||||
</executions>
|
||||
</plugin>
|
||||
<!-- FIXME This activates jacoco all the time - need to add profile -->
|
||||
<!--
|
||||
<plugin>
|
||||
<groupId>org.jacoco</groupId>
|
||||
<artifactId>jacoco-maven-plugin</artifactId>
|
||||
|
@ -2609,6 +2676,7 @@
|
|||
</execution>
|
||||
</executions>
|
||||
</plugin>
|
||||
-->
|
||||
</plugins>
|
||||
</build>
|
||||
|
||||
|
@ -2719,77 +2787,8 @@
|
|||
</plugins>
|
||||
</build>
|
||||
</profile>
|
||||
<profile>
|
||||
<id>ALLMODULES</id>
|
||||
<activation>
|
||||
<activeByDefault>true</activeByDefault>
|
||||
</activation>
|
||||
<modules>
|
||||
<module>hapi-fhir-checkstyle</module>
|
||||
<module>hapi-fhir-bom</module>
|
||||
<module>hapi-deployable-pom</module>
|
||||
<module>hapi-fhir-base</module>
|
||||
<module>hapi-fhir-docs</module>
|
||||
<module>hapi-fhir-test-utilities</module>
|
||||
<module>hapi-fhir-jpaserver-test-utilities</module>
|
||||
<module>hapi-fhir-jpaserver-test-dstu2</module>
|
||||
<module>hapi-fhir-jpaserver-test-dstu3</module>
|
||||
<module>hapi-fhir-jpaserver-test-r4</module>
|
||||
<module>hapi-fhir-jpaserver-test-r4b</module>
|
||||
<module>hapi-fhir-jpaserver-test-r5</module>
|
||||
<module>hapi-fhir-jpaserver-elastic-test-utilities</module>
|
||||
<module>hapi-tinder-plugin</module>
|
||||
<module>hapi-tinder-test</module>
|
||||
<module>hapi-fhir-client</module>
|
||||
<module>hapi-fhir-server</module>
|
||||
<module>hapi-fhir-server-mdm</module>
|
||||
<module>hapi-fhir-server-openapi</module>
|
||||
<module>hapi-fhir-converter</module>
|
||||
<module>hapi-fhir-validation</module>
|
||||
<module>hapi-fhir-structures-dstu2</module>
|
||||
<module>hapi-fhir-structures-hl7org-dstu2</module>
|
||||
<module>hapi-fhir-validation-resources-dstu2</module>
|
||||
<module>hapi-fhir-structures-dstu2.1</module>
|
||||
<module>hapi-fhir-validation-resources-dstu2.1</module>
|
||||
<module>hapi-fhir-structures-dstu3</module>
|
||||
<module>hapi-fhir-validation-resources-dstu3</module>
|
||||
<module>hapi-fhir-structures-r4</module>
|
||||
<module>hapi-fhir-validation-resources-r4</module>
|
||||
<module>hapi-fhir-structures-r4b</module>
|
||||
<module>hapi-fhir-structures-r5</module>
|
||||
<module>hapi-fhir-validation-resources-r5</module>
|
||||
<module>hapi-fhir-jpa</module>
|
||||
<module>hapi-fhir-storage</module>
|
||||
<module>hapi-fhir-storage-batch2</module>
|
||||
<module>hapi-fhir-storage-batch2-jobs</module>
|
||||
<module>hapi-fhir-storage-mdm</module>
|
||||
<module>hapi-fhir-storage-test-utilities</module>
|
||||
<module>hapi-fhir-jpaserver-cql</module>
|
||||
<module>hapi-fhir-jpaserver-model</module>
|
||||
<module>hapi-fhir-jpaserver-searchparam</module>
|
||||
<module>hapi-fhir-jpaserver-subscription</module>
|
||||
<module>hapi-fhir-jaxrsserver-base</module>
|
||||
<module>hapi-fhir-batch</module>
|
||||
<module>hapi-fhir-jpaserver-base</module>
|
||||
<module>hapi-fhir-sql-migrate</module>
|
||||
<module>hapi-fhir-jpaserver-mdm</module>
|
||||
<module>hapi-fhir-testpage-overlay</module>
|
||||
<module>hapi-fhir-jpaserver-uhnfhirtest</module>
|
||||
<module>hapi-fhir-client-okhttp</module>
|
||||
<module>hapi-fhir-android</module>
|
||||
<module>hapi-fhir-cli</module>
|
||||
<module>hapi-fhir-dist</module>
|
||||
<module>tests/hapi-fhir-base-test-jaxrsserver-kotlin</module>
|
||||
<module>tests/hapi-fhir-base-test-mindeps-client</module>
|
||||
<module>tests/hapi-fhir-base-test-mindeps-server</module>
|
||||
<module>hapi-fhir-spring-boot</module>
|
||||
</modules>
|
||||
</profile>
|
||||
<profile>
|
||||
<id>JACOCO</id>
|
||||
<modules>
|
||||
<module>hapi-fhir-jacoco</module>
|
||||
</modules>
|
||||
<build>
|
||||
<plugins>
|
||||
<plugin>
|
||||
|
|
|
@ -170,7 +170,7 @@ jobs:
|
|||
inputs:
|
||||
goals: 'clean install'
|
||||
# These are Maven CLI options (and show up in the build logs) - "-nsu"=Don't update snapshots. We can remove this when Maven OSS is more healthy
|
||||
options: '-P ALLMODULES,JACOCO,CI,ERRORPRONE -e -B -Dmaven.repo.local=$(MAVEN_CACHE_FOLDER) -Dmaven.wagon.http.pool=false -Dhttp.keepAlive=false -Dstyle.color=always -Djansi.force=true'
|
||||
options: '-P JACOCO,CI,ERRORPRONE -e -B -Dmaven.repo.local=$(MAVEN_CACHE_FOLDER) -Dmaven.wagon.http.pool=false -Dhttp.keepAlive=false -Dstyle.color=always -Djansi.force=true'
|
||||
# These are JVM options (and don't show up in the build logs)
|
||||
mavenOptions: '-Xmx1024m $(MAVEN_OPTS) -Dorg.slf4j.simpleLogger.showDateTime=true -Dorg.slf4j.simpleLogger.dateTimeFormat=HH:mm:ss,SSS -Duser.timezone=America/Toronto'
|
||||
jdkVersionOption: 1.11
|
||||
|
|
|
@ -88,5 +88,5 @@ steps:
|
|||
inputs:
|
||||
mavenPomFile: '$(System.DefaultWorkingDirectory)/pom.xml'
|
||||
goals: deploy
|
||||
options: '--settings $(System.DefaultWorkingDirectory)/settings.xml -P DIST,ALLMODULES -DskipTests'
|
||||
options: '--settings $(System.DefaultWorkingDirectory)/settings.xml -P DIST -DskipTests'
|
||||
publishJUnitResults: false
|
||||
|
|
|
@ -27,7 +27,7 @@ jobs:
|
|||
inputs:
|
||||
goals: 'install'
|
||||
# These are Maven CLI options (and show up in the build logs) - "-nsu"=Don't update snapshots. We can remove this when Maven OSS is more healthy
|
||||
options: '-P ALLMODULES,CI,FASTINSTALL -e -B -Dmaven.repo.local=$(MAVEN_CACHE_FOLDER) -Dmaven.javadoc.skip=true -Dmaven.wagon.http.pool=false -Dhttp.keepAlive=false -Dstyle.color=always -Djansi.force=true'
|
||||
options: '-P CI,FASTINSTALL -e -B -Dmaven.repo.local=$(MAVEN_CACHE_FOLDER) -Dmaven.javadoc.skip=true -Dmaven.wagon.http.pool=false -Dhttp.keepAlive=false -Dstyle.color=always -Djansi.force=true'
|
||||
# These are JVM options (and don't show up in the build logs)
|
||||
mavenOptions: '-Xmx1024m $(MAVEN_OPTS) -Dorg.slf4j.simpleLogger.showDateTime=true -Dorg.slf4j.simpleLogger.dateTimeFormat=HH:mm:ss,SSS -Duser.timezone=America/Toronto'
|
||||
jdkVersionOption: 1.11
|
||||
|
@ -60,7 +60,7 @@ jobs:
|
|||
mavenPomFile: '$(System.DefaultWorkingDirectory)/pom.xml'
|
||||
goals: 'clean test jacoco:report -pl ${{ p.module }}'
|
||||
# These are Maven CLI options (and show up in the build logs) - "-nsu"=Don't update snapshots. We can remove this when Maven OSS is more healthy
|
||||
options: '-P ALLMODULES,JACOCO,CI -e -B -Dmaven.repo.local=$(MAVEN_CACHE_FOLDER) -Dmaven.wagon.http.pool=false -Dhttp.keepAlive=false -Dstyle.color=always -Djansi.force=true'
|
||||
options: '-P JACOCO,CI -e -B -Dmaven.repo.local=$(MAVEN_CACHE_FOLDER) -Dmaven.wagon.http.pool=false -Dhttp.keepAlive=false -Dstyle.color=always -Djansi.force=true'
|
||||
# These are JVM options (and don't show up in the build logs)
|
||||
mavenOptions: '-Xmx1024m $(MAVEN_OPTS) -Dorg.slf4j.simpleLogger.showDateTime=true -Dorg.slf4j.simpleLogger.dateTimeFormat=HH:mm:ss,SSS -Duser.timezone=America/Toronto'
|
||||
jdkVersionOption: 1.11
|
||||
|
@ -124,7 +124,7 @@ jobs:
|
|||
mavenPomFile: '$(System.DefaultWorkingDirectory)/pom.xml'
|
||||
goals: 'jacoco:report-aggregate'
|
||||
# These are Maven CLI options (and show up in the build logs) - "-nsu"=Don't update snapshots. We can remove this when Maven OSS is more healthy
|
||||
options: '-P ALLMODULES,JACOCO'
|
||||
options: '-P JACOCO'
|
||||
# These are JVM options (and don't show up in the build logs)
|
||||
mavenOptions: '-Xmx1024m $(MAVEN_OPTS) -Dorg.slf4j.simpleLogger.showDateTime=true -Dorg.slf4j.simpleLogger.dateTimeFormat=HH:mm:ss,SSS -Duser.timezone=America/Toronto'
|
||||
jdkVersionOption: 1.11
|
||||
|
|
Loading…
Reference in New Issue