Skip to content
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

Generate jacoco report in conformance suite #21102

Merged
merged 3 commits into from
Sep 13, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
23 changes: 22 additions & 1 deletion .github/workflows/fapi-oidc-conformance-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -253,13 +253,34 @@ jobs:
name: test-logs
path: ./*log.txt

- name: Archive Jacoco results
- name: Archive Jacoco exec
uses: actions/upload-artifact@v4
if: always()
with:
name: jacoco-exec
path: ./jacoco.exec

- name: Build Jacoco Report Generator
run: |
cd ./product-is/modules/integration/tests-common/jacoco-report-generator
mvn clean install
ARTIFACT_ID=$(mvn help:evaluate -Dexpression=project.artifactId -q -DforceStdout)
VERSION=$(mvn help:evaluate -Dexpression=project.version -q -DforceStdout)
JAR_NAME="${ARTIFACT_ID}-${VERSION}.jar"
echo "JAR_NAME=${JAR_NAME}" >> $GITHUB_ENV
echo "Report generator jar name: $JAR_NAME"

- name: Generate Jacoco Report
run: |
java -jar ./product-is/modules/integration/tests-common/jacoco-report-generator/target/${{ env.JAR_NAME }} ./jacoco.exec ./product-is/oidc-fapi-conformance-tests/${{ env.PRODUCT_IS_DIR }}/repository/deployment/server/webapps ./product-is/oidc-fapi-conformance-tests/${{ env.PRODUCT_IS_DIR }}/repository/components/plugins ./product-is/oidc-fapi-conformance-tests/${{ env.PRODUCT_IS_DIR }}/repository/components/dropins ./product-is/oidc-fapi-conformance-tests/${{ env.PRODUCT_IS_DIR }}/lib/runtimes/cxf3

- name: Archive Jacoco report
uses: actions/upload-artifact@v4
if: always()
with:
name: jacoco-xml
path: ./report/jacoco.xml

- name: Send Email
if: always()
run: |
Expand Down
25 changes: 23 additions & 2 deletions .github/workflows/oidc-conformance-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -206,13 +206,34 @@ jobs:
name: test-logs
path: ./*log.txt

- name: Archive Jacoco results
uses: actions/upload-artifact@v3
- name: Archive Jacoco exec
uses: actions/upload-artifact@v4
if: always()
with:
name: jacoco-exec
path: ./jacoco.exec

- name: Build Jacoco Report Generator
run: |
cd ./product-is/modules/integration/tests-common/jacoco-report-generator
mvn clean install
ARTIFACT_ID=$(mvn help:evaluate -Dexpression=project.artifactId -q -DforceStdout)
VERSION=$(mvn help:evaluate -Dexpression=project.version -q -DforceStdout)
JAR_NAME="${ARTIFACT_ID}-${VERSION}.jar"
echo "JAR_NAME=${JAR_NAME}" >> $GITHUB_ENV
echo "Report generator jar name: $JAR_NAME"

- name: Generate Jacoco Report
run: |
java -jar ./product-is/modules/integration/tests-common/jacoco-report-generator/target/${{ env.JAR_NAME }} ./jacoco.exec ./product-is/oidc-conformance-tests/${{ env.PRODUCT_IS_DIR }}/repository/deployment/server/webapps ./product-is/oidc-conformance-tests/${{ env.PRODUCT_IS_DIR }}/repository/components/plugins ./product-is/oidc-conformance-tests/${{ env.PRODUCT_IS_DIR }}/repository/components/dropins ./product-is/oidc-conformance-tests/${{ env.PRODUCT_IS_DIR }}/lib/runtimes/cxf3

- name: Archive Jacoco report
uses: actions/upload-artifact@v4
if: always()
with:
name: jacoco-xml
path: ./report/jacoco.xml

- name: Send Email
if: always()
run: |
Expand Down
95 changes: 95 additions & 0 deletions modules/integration/tests-common/jacoco-report-generator/pom.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,95 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
~ Copyright (c) 2024, WSO2 LLC. (http://www.wso2.com).
~
~ WSO2 LLC. licenses this file to you under the Apache License,
~ Version 2.0 (the "License"); you may not use this file except
~ in compliance with the License.
~ You may obtain a copy of the License at
~
~ http://www.apache.org/licenses/LICENSE-2.0
~
~ Unless required by applicable law or agreed to in writing,
~ software distributed under the License is distributed on an
~ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
~ KIND, either express or implied. See the License for the
~ specific language governing permissions and limitations
~ under the License.
-->

<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>org.wso2.is</groupId>
<artifactId>identity-integration-tests</artifactId>
<version>7.0.1-SNAPSHOT</version>
<relativePath>../../pom.xml</relativePath>
</parent>

<artifactId>jacoco-report-generator</artifactId>

<properties>
<maven.compiler.source>11</maven.compiler.source>
<maven.compiler.target>11</maven.compiler.target>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<org.jacoco.version>0.8.12</org.jacoco.version>
<plexus-utils.version>4.0.1</plexus-utils.version>
<maven-shade-plugin.version>3.2.4</maven-shade-plugin.version>
</properties>

<dependencies>
<dependency>
<groupId>org.jacoco</groupId>
<artifactId>org.jacoco.core</artifactId>
<version>${org.jacoco.version}</version>
</dependency>
<dependency>
<groupId>org.jacoco</groupId>
<artifactId>org.jacoco.report</artifactId>
<version>${org.jacoco.version}</version>
</dependency>
<dependency>
<groupId>org.codehaus.plexus</groupId>
<artifactId>plexus-utils</artifactId>
<version>${plexus-utils.version}</version>
</dependency>
</dependencies>

<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-shade-plugin</artifactId>
<version>${maven-shade-plugin.version}</version>
<executions>
<execution>
<phase>package</phase>
<goals>
<goal>shade</goal>
</goals>
<configuration>
<artifactSet>
<includes>
<include>org.jacoco:org.jacoco.core</include>
<include>org.jacoco:org.jacoco.report</include>
<include>org.codehaus.plexus:plexus-utils</include>
<include>org.ow2.asm:asm</include>
<include>org.ow2.asm:asm-tree</include>
<include>org.ow2.asm:asm-commons</include>
</includes>
</artifactSet>
<transformers>
<transformer
implementation="org.apache.maven.plugins.shade.resource.ManifestResourceTransformer">
<mainClass>org.wso2.carbon.identity.jacoco.ReportGenerator</mainClass>
</transformer>
</transformers>
</configuration>
</execution>
</executions>
</plugin>
</plugins>
</build>
</project>
Loading