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

Fixes #4593 - Add JSON Binding TCK certification for Piranha Core Profile #4594

Merged
merged 1 commit into from
Feb 17, 2025
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
59 changes: 52 additions & 7 deletions .github/workflows/tck-coreprofile.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,8 @@ on:
required: true
default: 'current'
jobs:
tck:
if: ${{ always() }}
annotations:
if: ${{ always() }} && github.repository == 'piranhacloud/piranha'
runs-on: ${{ matrix.os }}
strategy:
matrix:
Expand All @@ -27,25 +27,70 @@ jobs:
with:
distribution: 'temurin'
java-version: ${{ matrix.java }}
- name: Run TCK
- name: Run Annotations TCK
run: |
mvn -B -DskipTests=true -DskipITs=true -ntp install
cd test/tck/coreprofile
cd test/tck/coreprofile/annotations
mvn -B -ntp install
- name: Annotation TCK Test Summary
uses: test-summary/action@v2
with:
paths: "test/tck/coreprofile/annotations/runner/target/failsafe-reports/*IT.xml"
if: always()
- name: Inject TCK Test Summary
inject:
if: ${{ always() }} && github.repository == 'piranhacloud/piranha'
runs-on: ${{ matrix.os }}
strategy:
matrix:
java: [ '21' ]
os: [ubuntu-latest]
steps:
- name: Checkout Sources
uses: actions/checkout@v4
- name: Set up Java ${{ matrix.java }}
uses: actions/setup-java@v4
with:
distribution: 'temurin'
java-version: ${{ matrix.java }}
- name: Run Inject TCK
run: |
mvn -B -DskipTests=true -DskipITs=true -ntp install
cd test/tck/coreprofile/inject
mvn -B -ntp install
- name: Test Summary
uses: test-summary/action@v2
with:
paths: "test/tck/coreprofile/inject/installer/target/tck/example/target/surefire-reports/TEST-*.xml"
if: always()
if: always()
jsonb:
if: ${{ always() }} && github.repository == 'piranhacloud/piranha'
runs-on: ${{ matrix.os }}
strategy:
matrix:
java: [ '21' ]
os: [ubuntu-latest]
steps:
- name: Checkout Sources
uses: actions/checkout@v4
- name: Set up Java ${{ matrix.java }}
uses: actions/setup-java@v4
with:
distribution: 'temurin'
java-version: ${{ matrix.java }}
- name: Run JSON Binding TCK
run: |
mvn -B -DskipTests=true -DskipITs=true -ntp install
cd test/tck/coreprofile/jsonb
mvn -B -ntp install
- name: Test Summary
uses: test-summary/action@v2
with:
paths: "test/tck/coreprofile/jsonb/installer/target/tck/bin/target/surefire-reports/TEST-*.xml"
if: always()
result:
if: ${{ always() }} && github.repository == 'piranhacloud/piranha'
runs-on: ubuntu-latest
needs: tck
needs: [annotations, inject, jsonb]
steps:
- name: Check build results
run: |
Expand Down
9 changes: 9 additions & 0 deletions test/tck/coreprofile/annotations/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,15 @@
<artifactId>project</artifactId>
<packaging>pom</packaging>
<name>Piranha - Test - TCK - Core Profile - Annotations TCK</name>
<dependencyManagement>
<dependencies>
<dependency>
<groupId>jakarta.annotation</groupId>
<artifactId>jakarta-annotations-tck</artifactId>
<version>${annotations.tck.version}</version>
</dependency>
</dependencies>
</dependencyManagement>
<modules>
<module>installer</module>
<module>runner</module>
Expand Down
61 changes: 61 additions & 0 deletions test/tck/coreprofile/jsonb/installer/pom.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,61 @@
<?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 https://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<parent>
<groupId>cloud.piranha.test.tck.coreprofile.jsonb</groupId>
<artifactId>project</artifactId>
<version>25.3.0-SNAPSHOT</version>
</parent>
<artifactId>installer</artifactId>
<packaging>pom</packaging>
<name>Piranha - Test - TCK - Core Profile - JSON Binding TCK - Installer</name>
<properties>
<tck.home>${project.build.directory}/tck</tck.home>
</properties>
<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-antrun-plugin</artifactId>
<executions>
<execution>
<id>pre-integration-test</id>
<phase>pre-integration-test</phase>
<goals>
<goal>run</goal>
</goals>
<configuration>
<target>
<!-- Download, unzip and rename TCK -->
<get src="https://download.eclipse.org/jakartaee/jsonb/3.0/jakarta-jsonb-tck-${jsonb.tck.version}.zip"
dest="${project.build.directory}/tck.zip"
skipexisting="true"/>
<unzip src="${project.build.directory}/tck.zip"
dest="${project.build.directory}"/>
<move file="${project.build.directory}/jsonb-tck"
tofile="${project.build.directory}/tck"/>

<!-- Install the TCK JAR into local Maven repository -->
<chmod dir="${project.build.directory}/tck/artifacts"
perm="ugo+rx"
includes="*"/>
<exec dir="${project.build.directory}/tck/artifacts"
executable="./artifact-install.sh"/>

<!-- Setup bin/pom.xml for correct Yasson version -->
<replaceregexp file="${tck.home}/bin/pom.xml"
match="&lt;jsonb-impl.version>(.*)&lt;/jsonb-impl.version>"
replace="&lt;jsonb-impl.version>${yasson.version}&lt;/jsonb-impl.version>"
byline="true"/>
</target>
</configuration>
</execution>
</executions>
</plugin>
</plugins>
</build>
</project>
21 changes: 21 additions & 0 deletions test/tck/coreprofile/jsonb/pom.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
<?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 https://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<parent>
<groupId>cloud.piranha.test.tck.coreprofile</groupId>
<artifactId>project</artifactId>
<version>25.3.0-SNAPSHOT</version>
</parent>
<groupId>cloud.piranha.test.tck.coreprofile.jsonb</groupId>
<artifactId>project</artifactId>
<packaging>pom</packaging>
<name>Piranha - Test - TCK - Core Profile - JSON Binding TCK - Project</name>
<modules>
<module>installer</module>
<module>runner</module>
</modules>
</project>
60 changes: 60 additions & 0 deletions test/tck/coreprofile/jsonb/runner/pom.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,60 @@
<?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 https://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<parent>
<groupId>cloud.piranha.test.tck.coreprofile.jsonb</groupId>
<artifactId>project</artifactId>
<version>25.3.0-SNAPSHOT</version>
</parent>
<artifactId>runner</artifactId>
<packaging>pom</packaging>
<name>Piranha - Test - TCK - Core Profile - JSON Binding TCK - Runner</name>
<properties>
<tck.home>${project.build.directory}/../../installer/target/tck</tck.home>
</properties>
<dependencies>
<dependency>
<groupId>cloud.piranha.test.tck.coreprofile.jsonb</groupId>
<artifactId>installer</artifactId>
<version>${project.version}</version>
<type>pom</type>
</dependency>
</dependencies>
<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-antrun-plugin</artifactId>
<executions>
<execution>
<id>integration-test</id>
<phase>integration-test</phase>
<goals>
<goal>run</goal>
</goals>
<configuration>
<target>
<!-- Run the tests -->
<echo>----------------------------------------------------------</echo>
<echo>Running JSON Binding TCK ${jsonb.tck.version} against Yasson ${yasson.version}</echo>
<echo>----------------------------------------------------------</echo>
<exec dir="${tck.home}/bin"
executable="mvn">
<arg value="-Djava.locale.providers=COMPAT"/>
<arg value="verify"/>
</exec>
<echo>----------------------------------------------------------</echo>
<echo>Ran JSON Binding TCK ${jsonb.tck.version} against Yasson ${yasson.version}</echo>
<echo>----------------------------------------------------------</echo>
</target>
</configuration>
</execution>
</executions>
</plugin>
</plugins>
</build>
</project>
9 changes: 4 additions & 5 deletions test/tck/coreprofile/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,11 @@
<packaging>pom</packaging>
<name>Piranha - Test - TCK - Core Profile</name>
<properties>
<!-- TCK versions -->
<annotations.tck.version>3.0.0</annotations.tck.version>
<inject.tck.version>2.0.2</inject.tck.version>
<jsonb.tck.version>3.0.0</jsonb.tck.version>
<!-- Maven plugin versions -->
<sigtest-maven-plugin.version>2.4</sigtest-maven-plugin.version>
</properties>
<dependencyManagement>
Expand All @@ -33,15 +36,11 @@
<artifactId>sigtest-maven-plugin</artifactId>
<version>${sigtest-maven-plugin.version}</version>
</dependency>
<dependency>
<groupId>jakarta.annotation</groupId>
<artifactId>jakarta-annotations-tck</artifactId>
<version>${annotations.tck.version}</version>
</dependency>
</dependencies>
</dependencyManagement>
<modules>
<module>annotations</module>
<module>inject</module>
<module>jsonb</module>
</modules>
</project>
Loading