| # | |
| # Copyright (c) 2021, 2026 Oracle and/or its affiliates. All rights reserved. | |
| # | |
| # This program and the accompanying materials are made available under the | |
| # terms of the Eclipse Public License v. 2.0 which is available at | |
| # http://www.eclipse.org/legal/epl-2.0, | |
| # or the Eclipse Distribution License v. 1.0 which is available at | |
| # http://www.eclipse.org/org/documents/edl-v10.php. | |
| # | |
| # SPDX-License-Identifier: EPL-2.0 OR BSD-3-Clause | |
| # | |
| name: Yasson | |
| on: | |
| push: | |
| branches: | |
| - 'main' | |
| - '*-RELEASE' | |
| pull_request: | |
| branches: | |
| - 'main' | |
| - '*-RELEASE' | |
| jobs: | |
| build: | |
| name: Test on JDK ${{ matrix.java_version }} locale ${{ matrix.locale }} | |
| runs-on: ubuntu-latest | |
| strategy: | |
| matrix: | |
| java_version: [ 17, 21, 25 ] | |
| include: | |
| - locale: en_US | |
| # Use a different locale when running against one of the java versions | |
| # to ensure we correctly write tests that account for localization differences. | |
| - locale: de_AT | |
| java_version: 21 | |
| steps: | |
| - name: Checkout for build | |
| uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 | |
| with: | |
| fetch-depth: 0 | |
| - name: Set up compile JDK | |
| uses: actions/setup-java@de7274f081f381c8f8158605e0321c36c376e2e6 # v6.0.1 | |
| with: #Compile java needs to be the highest to ensure proper compilation of the multi-release jar | |
| distribution: 'temurin' | |
| java-version: 17 | |
| cache: 'maven' | |
| - name: Copyright | |
| run: bash etc/copyright.sh | |
| - name: Checkstyle | |
| run: mvn -B checkstyle:checkstyle | |
| - name: Yasson install | |
| run: mvn -U -C clean install -DskipTests | |
| - name: Yasson jmh package | |
| run: mvn -U -C -f yasson-jmh/pom.xml clean package | |
| - name: Yasson tests | |
| run: | | |
| export LANG_TAG="${{ matrix.locale }}" | |
| mvn -U -B -C \ | |
| -Dmaven.javadoc.skip=true \ | |
| -Duser.language="${LANG_TAG%%_*}" \ | |
| -Duser.country="${LANG_TAG##*_}" \ | |
| verify | |
| - name: Jakarta JSON-B TCK | |
| run: cd yasson-tck && mvn -U -B test -DargLine="-Djava.locale.providers=COMPAT" |