Skip to content

Commit

Permalink
Enable code coverage reporting for all services (Azure#18221)
Browse files Browse the repository at this point in the history
* Enable code coverage reporting for all services

* Fix eventgrid pom
  • Loading branch information
srnagar authored Dec 21, 2020
1 parent 5db958c commit a6bed45
Show file tree
Hide file tree
Showing 21 changed files with 1,222 additions and 125 deletions.
2 changes: 1 addition & 1 deletion eng/pipelines/templates/jobs/archetype-sdk-client.yml
Original file line number Diff line number Diff line change
Expand Up @@ -312,7 +312,7 @@ jobs:

- task: Maven@3
displayName: 'Generate aggregate code coverage report'
condition: and(eq(variables['OsName'], 'Windows'), eq(variables['JavaTestVersion'], '1.11'), eq('${{ parameters.ServiceDirectory }}', 'template'))
condition: and(eq(variables['OsName'], 'Windows'), eq(variables['JavaTestVersion'], '1.11'))
inputs:
mavenPomFile: sdk/${{ parameters.ServiceDirectory }}/pom.xml
options: -Pcoverage
Expand Down
50 changes: 47 additions & 3 deletions sdk/anomalydetector/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,51 @@
<artifactId>azure-anomalydetector-service</artifactId>
<packaging>pom</packaging>
<version>1.0.0</version><!-- Need not change for every release-->
<modules>
<module>azure-ai-anomalydetector</module>
</modules>
<profiles>
<profile>
<id>coverage</id>
<modules>
<module>azure-ai-anomalydetector</module>
</modules>

<dependencies>
<dependency>
<groupId>com.azure</groupId>
<artifactId>azure-ai-anomalydetector</artifactId>
<version>3.0.0-beta.2</version> <!-- {x-version-update;com.azure:azure-ai-anomalydetector;current} -->
</dependency>
</dependencies>

<build>
<plugins>
<plugin>
<groupId>org.jacoco</groupId>
<artifactId>jacoco-maven-plugin</artifactId>
<version>0.8.5</version> <!-- {x-version-update;org.jacoco:jacoco-maven-plugin;external_dependency} -->
<executions>
<execution>
<id>report-aggregate</id>
<phase>verify</phase>
<goals>
<goal>report-aggregate</goal>
</goals>
<configuration>
<outputDirectory>${project.reporting.outputDirectory}/test-coverage</outputDirectory>
</configuration>
</execution>
</executions>
</plugin>
</plugins>
</build>
</profile>
<profile>
<id>default</id>
<activation>
<activeByDefault>true</activeByDefault>
</activation>
<modules>
<module>azure-ai-anomalydetector</module>
</modules>
</profile>
</profiles>
</project>
62 changes: 53 additions & 9 deletions sdk/appconfiguration/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -8,13 +8,57 @@
<artifactId>azure-appconfiguration-service</artifactId>
<packaging>pom</packaging>
<version>1.0.0</version><!-- Need not change for every release-->
<modules>
<module>azure-data-appconfiguration</module>
<module>azure-spring-cloud-appconfiguration-config</module>
<module>azure-spring-cloud-appconfiguration-config-web</module>
<module>azure-spring-cloud-feature-management</module>
<module>azure-spring-cloud-feature-management-web</module>
<module>azure-spring-cloud-starter-appconfiguration-config</module>
<module>azure-spring-cloud-test-appconfiguration-config</module>
</modules>
<profiles>
<profile>
<id>coverage</id>
<modules>
<module>azure-data-appconfiguration</module>
</modules>

<dependencies>
<dependency>
<groupId>com.azure</groupId>
<artifactId>azure-data-appconfiguration</artifactId>
<version>1.2.0-beta.1</version> <!-- {x-version-update;com.azure:azure-data-appconfiguration;current} -->
</dependency>
</dependencies>

<build>
<plugins>
<plugin>
<groupId>org.jacoco</groupId>
<artifactId>jacoco-maven-plugin</artifactId>
<version>0.8.5</version> <!-- {x-version-update;org.jacoco:jacoco-maven-plugin;external_dependency} -->
<executions>
<execution>
<id>report-aggregate</id>
<phase>verify</phase>
<goals>
<goal>report-aggregate</goal>
</goals>
<configuration>
<outputDirectory>${project.reporting.outputDirectory}/test-coverage</outputDirectory>
</configuration>
</execution>
</executions>
</plugin>
</plugins>
</build>
</profile>
<profile>
<id>default</id>
<activation>
<activeByDefault>true</activeByDefault>
</activation>
<modules>
<module>azure-data-appconfiguration</module>
<module>azure-spring-cloud-appconfiguration-config</module>
<module>azure-spring-cloud-appconfiguration-config-web</module>
<module>azure-spring-cloud-feature-management</module>
<module>azure-spring-cloud-feature-management-web</module>
<module>azure-spring-cloud-starter-appconfiguration-config</module>
<module>azure-spring-cloud-test-appconfiguration-config</module>
</modules>
</profile>
</profiles>
</project>
75 changes: 69 additions & 6 deletions sdk/communication/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,73 @@
<artifactId>azure-communication-service</artifactId>
<packaging>pom</packaging>
<version>1.0.0</version><!-- Need not change for every release-->
<modules>
<module>azure-communication-common</module>
<module>azure-communication-sms</module>
<module>azure-communication-chat</module>
<module>azure-communication-administration</module>
</modules>

<profiles>
<profile>
<id>coverage</id>
<modules>
<module>azure-communication-common</module>
<module>azure-communication-sms</module>
<module>azure-communication-chat</module>
<module>azure-communication-administration</module>
</modules>

<dependencies>
<dependency>
<groupId>com.azure</groupId>
<artifactId>azure-communication-administration</artifactId>
<version>1.0.0-beta.4</version> <!-- {x-version-update;com.azure:azure-communication-administration;current} -->
</dependency>
<dependency>
<groupId>com.azure</groupId>
<artifactId>azure-communication-chat</artifactId>
<version>1.0.0-beta.4</version> <!-- {x-version-update;com.azure:azure-communication-chat;current} -->
</dependency>
<dependency>
<groupId>com.azure</groupId>
<artifactId>azure-communication-common</artifactId>
<version>1.0.0-beta.4</version> <!-- {x-version-update;com.azure:azure-communication-common;current} -->
</dependency>
<dependency>
<groupId>com.azure</groupId>
<artifactId>azure-communication-sms</artifactId>
<version>1.0.0-beta.4</version> <!-- {x-version-update;com.azure:azure-communication-sms;current} -->
</dependency>
</dependencies>

<build>
<plugins>
<plugin>
<groupId>org.jacoco</groupId>
<artifactId>jacoco-maven-plugin</artifactId>
<version>0.8.5</version> <!-- {x-version-update;org.jacoco:jacoco-maven-plugin;external_dependency} -->
<executions>
<execution>
<id>report-aggregate</id>
<phase>verify</phase>
<goals>
<goal>report-aggregate</goal>
</goals>
<configuration>
<outputDirectory>${project.reporting.outputDirectory}/test-coverage</outputDirectory>
</configuration>
</execution>
</executions>
</plugin>
</plugins>
</build>
</profile>
<profile>
<id>default</id>
<activation>
<activeByDefault>true</activeByDefault>
</activation>
<modules>
<module>azure-communication-common</module>
<module>azure-communication-sms</module>
<module>azure-communication-chat</module>
<module>azure-communication-administration</module>
</modules>
</profile>
</profiles>
</project>
142 changes: 127 additions & 15 deletions sdk/core/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -8,19 +8,131 @@
<artifactId>azure-core-service</artifactId>
<packaging>pom</packaging>
<version>1.0.0</version><!-- Need not change for every release-->
<modules>
<module>azure-core</module>
<module>azure-core-amqp</module>
<module>azure-core-amqp-experimental</module>
<module>azure-core-experimental</module>
<module>azure-core-http-jdk-httpclient</module>
<module>azure-core-http-netty</module>
<module>azure-core-http-okhttp</module>
<module>azure-core-management</module>
<module>azure-core-serializer-avro-apache</module>
<module>azure-core-serializer-json-gson</module>
<module>azure-core-serializer-json-jackson</module>
<module>azure-core-test</module>
<module>azure-core-tracing-opentelemetry</module>
</modules>

<profiles>
<profile>
<id>coverage</id>
<modules>
<module>azure-core</module>
<module>azure-core-amqp</module>
<module>azure-core-amqp-experimental</module>
<module>azure-core-experimental</module>
<module>azure-core-http-jdk-httpclient</module>
<module>azure-core-http-netty</module>
<module>azure-core-http-okhttp</module>
<module>azure-core-management</module>
<module>azure-core-serializer-avro-apache</module>
<module>azure-core-serializer-json-gson</module>
<module>azure-core-serializer-json-jackson</module>
<module>azure-core-test</module>
<module>azure-core-tracing-opentelemetry</module>
</modules>

<dependencies>
<dependency>
<groupId>com.azure</groupId>
<artifactId>azure-core</artifactId>
<version>1.12.0-beta.1</version> <!-- {x-version-update;com.azure:azure-core;current} -->
</dependency>
<dependency>
<groupId>com.azure</groupId>
<artifactId>azure-core-amqp</artifactId>
<version>2.1.0-beta.1</version> <!-- {x-version-update;com.azure:azure-core-amqp;current} -->
</dependency>
<dependency>
<groupId>com.azure</groupId>
<artifactId>azure-core-amqp-experimental</artifactId>
<version>1.0.0-beta.1</version> <!-- {x-version-update;com.azure:azure-core-amqp-experimental;current} -->
</dependency>
<dependency>
<groupId>com.azure</groupId>
<artifactId>azure-core-experimental</artifactId>
<version>1.0.0-beta.9</version> <!-- {x-version-update;com.azure:azure-core-experimental;current} -->
</dependency>
<dependency>
<groupId>com.azure</groupId>
<artifactId>azure-core-http-jdk-httpclient</artifactId>
<version>1.0.0-beta.1</version> <!-- {x-version-update;com.azure:azure-core-http-jdk-httpclient;current} -->
</dependency>
<dependency>
<groupId>com.azure</groupId>
<artifactId>azure-core-http-netty</artifactId>
<version>1.8.0-beta.1</version> <!-- {x-version-update;com.azure:azure-core-http-netty;current} -->
</dependency>
<dependency>
<groupId>com.azure</groupId>
<artifactId>azure-core-http-okhttp</artifactId>
<version>1.5.0-beta.1</version> <!-- {x-version-update;com.azure:azure-core-http-okhttp;current} -->
</dependency>
<dependency>
<groupId>com.azure</groupId>
<artifactId>azure-core-management</artifactId>
<version>1.1.0-beta.1</version> <!-- {x-version-update;com.azure:azure-core-management;current} -->
</dependency>
<dependency>
<groupId>com.azure</groupId>
<artifactId>azure-core-serializer-avro-apache</artifactId>
<version>1.0.0-beta.6</version> <!-- {x-version-update;com.azure:azure-core-serializer-avro-apache;current} -->
</dependency>
<dependency>
<groupId>com.azure</groupId>
<artifactId>azure-core-serializer-json-gson</artifactId>
<version>1.1.0-beta.1</version> <!-- {x-version-update;com.azure:azure-core-serializer-json-gson;current} -->
</dependency>
<dependency>
<groupId>com.azure</groupId>
<artifactId>azure-core-serializer-json-jackson</artifactId>
<version>1.2.0-beta.1</version> <!-- {x-version-update;com.azure:azure-core-serializer-json-jackson;current} -->
</dependency>
<dependency>
<groupId>com.azure</groupId>
<artifactId>azure-core-tracing-opentelemetry</artifactId>
<version>1.0.0-beta.7</version> <!-- {x-version-update;com.azure:azure-core-tracing-opentelemetry;current} -->
</dependency>
</dependencies>

<build>
<plugins>
<plugin>
<groupId>org.jacoco</groupId>
<artifactId>jacoco-maven-plugin</artifactId>
<version>0.8.5</version> <!-- {x-version-update;org.jacoco:jacoco-maven-plugin;external_dependency} -->
<executions>
<execution>
<id>report-aggregate</id>
<phase>verify</phase>
<goals>
<goal>report-aggregate</goal>
</goals>
<configuration>
<outputDirectory>${project.reporting.outputDirectory}/test-coverage</outputDirectory>
</configuration>
</execution>
</executions>
</plugin>
</plugins>
</build>
</profile>
<profile>
<id>default</id>
<activation>
<activeByDefault>true</activeByDefault>
</activation>
<modules>
<module>azure-core</module>
<module>azure-core-amqp</module>
<module>azure-core-amqp-experimental</module>
<module>azure-core-experimental</module>
<module>azure-core-http-jdk-httpclient</module>
<module>azure-core-http-netty</module>
<module>azure-core-http-okhttp</module>
<module>azure-core-management</module>
<module>azure-core-serializer-avro-apache</module>
<module>azure-core-serializer-json-gson</module>
<module>azure-core-serializer-json-jackson</module>
<module>azure-core-test</module>
<module>azure-core-tracing-opentelemetry</module>
</modules>
</profile>
</profiles>
</project>
Loading

0 comments on commit a6bed45

Please sign in to comment.