-
Notifications
You must be signed in to change notification settings - Fork 7
Aggregate Coverage #746
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. Weβll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Aggregate Coverage #746
Changes from 2 commits
Commits
Show all changes
14 commits
Select commit
Hold shift + click to select a range
e7478e1
add coverage module
Schmarvinius 8b66bcb
add sonarqube support
Schmarvinius 345ce20
adress suggestions
Schmarvinius 5233cd6
Merge branch 'main' into chore/aggregate_coverage
Schmarvinius 90727b1
Merge branch 'main' into chore/aggregate_coverage
Schmarvinius 0759d69
new try
Schmarvinius b386426
Merge branch 'main' into chore/aggregate_coverage
Schmarvinius a4f51c1
Merge branch 'main' into chore/aggregate_coverage
Schmarvinius 4255e65
Merge branch 'main' into chore/aggregate_coverage
lisajulia 152a8d9
Merge branch 'main' into chore/aggregate_coverage
Schmarvinius 8a1dd4b
adapt to new structure
Schmarvinius 28bb2fb
finalize
Schmarvinius fe1ac8c
Merge branch 'main' into chore/aggregate_coverage
Schmarvinius 3f7a3d8
add entry in design and adapt pipeline
Schmarvinius File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,176 @@ | ||
| <?xml version="1.0" encoding="UTF-8"?> | ||
| <project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> | ||
| <modelVersion>4.0.0</modelVersion> | ||
|
|
||
| <parent> | ||
| <groupId>com.sap.cds</groupId> | ||
| <artifactId>cds-feature-attachments-root</artifactId> | ||
| <version>${revision}</version> | ||
| </parent> | ||
|
|
||
| <artifactId>cds-feature-attachments-coverage-report</artifactId> | ||
| <packaging>pom</packaging> | ||
|
|
||
| <name>CDS Feature for Attachments - Coverage Report</name> | ||
| <description>Aggregated JaCoCo coverage report combining unit tests and integration tests.</description> | ||
|
|
||
| <!-- Dependencies whose coverage data and classes are included in the aggregated report --> | ||
| <dependencies> | ||
| <!-- Source module to measure coverage for --> | ||
| <dependency> | ||
| <groupId>com.sap.cds</groupId> | ||
| <artifactId>cds-feature-attachments</artifactId> | ||
| </dependency> | ||
|
|
||
| <!-- Module that produces additional coverage data via @SpringBootTest --> | ||
| <dependency> | ||
| <groupId>com.sap.cds.integration-tests</groupId> | ||
| <artifactId>cds-feature-attachments-integration-tests-srv</artifactId> | ||
| <version>${revision}</version> | ||
| </dependency> | ||
|
Schmarvinius marked this conversation as resolved.
|
||
| </dependencies> | ||
|
|
||
| <build> | ||
| <plugins> | ||
| <!-- Do not deploy this module --> | ||
| <plugin> | ||
| <artifactId>maven-deploy-plugin</artifactId> | ||
| <configuration> | ||
| <skip>true</skip> | ||
| </configuration> | ||
| </plugin> | ||
|
|
||
| <!-- Skip static analysis β this module has no source code --> | ||
| <plugin> | ||
| <groupId>com.github.spotbugs</groupId> | ||
| <artifactId>spotbugs-maven-plugin</artifactId> | ||
| <configuration> | ||
| <skip>true</skip> | ||
| </configuration> | ||
| </plugin> | ||
| <plugin> | ||
| <artifactId>maven-pmd-plugin</artifactId> | ||
| <configuration> | ||
| <skip>true</skip> | ||
| </configuration> | ||
| </plugin> | ||
|
|
||
| <!-- | ||
| Copy core module's compiled classes into this module's target/classes. | ||
| This uses the exact same class files that were instrumented at runtime, | ||
| avoiding JaCoCo "classes do not match" warnings that occur when | ||
| unpacking from the JAR artifact. | ||
| --> | ||
| <plugin> | ||
| <artifactId>maven-resources-plugin</artifactId> | ||
| <version>3.3.1</version> | ||
| <executions> | ||
| <execution> | ||
| <id>copy-core-classes</id> | ||
| <goals> | ||
| <goal>copy-resources</goal> | ||
| </goals> | ||
| <phase>generate-resources</phase> | ||
| <configuration> | ||
| <outputDirectory>${project.build.directory}/classes</outputDirectory> | ||
| <resources> | ||
| <resource> | ||
| <directory>${project.basedir}/../cds-feature-attachments/target/classes</directory> | ||
| </resource> | ||
| </resources> | ||
| </configuration> | ||
| </execution> | ||
| </executions> | ||
| </plugin> | ||
|
|
||
| <plugin> | ||
| <groupId>org.jacoco</groupId> | ||
| <artifactId>jacoco-maven-plugin</artifactId> | ||
| <executions> | ||
| <!-- Aggregate HTML/XML/CSV report from all dependency modules --> | ||
| <execution> | ||
| <id>jacoco-aggregate-report</id> | ||
| <goals> | ||
| <goal>report-aggregate</goal> | ||
| </goals> | ||
| <phase>verify</phase> | ||
| <configuration> | ||
| <dataFileExcludes> | ||
| <dataFileExclude>**/integration-tests/db/**</dataFileExclude> | ||
| </dataFileExcludes> | ||
|
Schmarvinius marked this conversation as resolved.
Outdated
|
||
| </configuration> | ||
| </execution> | ||
|
|
||
| <!-- Merge .exec files from unit tests and integration tests into one --> | ||
| <execution> | ||
| <id>jacoco-merge</id> | ||
| <goals> | ||
| <goal>merge</goal> | ||
| </goals> | ||
| <phase>verify</phase> | ||
|
Schmarvinius marked this conversation as resolved.
Outdated
|
||
| <configuration> | ||
| <fileSets> | ||
| <fileSet> | ||
| <directory>${project.basedir}/../cds-feature-attachments/target</directory> | ||
| <includes> | ||
| <include>jacoco.exec</include> | ||
| </includes> | ||
| </fileSet> | ||
| <fileSet> | ||
| <directory>${project.basedir}/../integration-tests/srv/target</directory> | ||
| <includes> | ||
| <include>jacoco.exec</include> | ||
| </includes> | ||
| </fileSet> | ||
| </fileSets> | ||
| <destFile>${project.build.directory}/jacoco-merged.exec</destFile> | ||
| </configuration> | ||
| </execution> | ||
|
|
||
| <!-- Enforce coverage thresholds on the merged data --> | ||
| <execution> | ||
| <id>jacoco-check-aggregated</id> | ||
| <goals> | ||
| <goal>check</goal> | ||
| </goals> | ||
| <phase>verify</phase> | ||
| <configuration> | ||
| <dataFile>${project.build.directory}/jacoco-merged.exec</dataFile> | ||
| <excludes> | ||
| <exclude>${excluded.generation.package}**/*</exclude> | ||
| </excludes> | ||
| <rules> | ||
| <rule implementation="org.jacoco.maven.RuleConfiguration"> | ||
| <element>BUNDLE</element> | ||
| <limits> | ||
| <limit implementation="org.jacoco.report.check.Limit"> | ||
| <counter>INSTRUCTION</counter> | ||
| <value>COVEREDRATIO</value> | ||
| <minimum>0.95</minimum> | ||
| </limit> | ||
| <limit implementation="org.jacoco.report.check.Limit"> | ||
| <counter>BRANCH</counter> | ||
| <value>COVEREDRATIO</value> | ||
| <minimum>0.95</minimum> | ||
| </limit> | ||
| <limit implementation="org.jacoco.report.check.Limit"> | ||
| <counter>COMPLEXITY</counter> | ||
| <value>COVEREDRATIO</value> | ||
| <minimum>0.95</minimum> | ||
| </limit> | ||
| <limit implementation="org.jacoco.report.check.Limit"> | ||
| <counter>CLASS</counter> | ||
| <value>MISSEDCOUNT</value> | ||
| <maximum>0</maximum> | ||
| </limit> | ||
| </limits> | ||
| </rule> | ||
| </rules> | ||
| </configuration> | ||
| </execution> | ||
| </executions> | ||
| </plugin> | ||
| </plugins> | ||
| </build> | ||
|
|
||
| </project> | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.