blob: 6374c2a21fa8c67e06770234fe268bf09e12a1b7 [file]
#
# 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: [ 11, 17, 21 ]
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@03ad4de0992f5dab5e18fcb136590ce7c4a0ac95 # v5.6.0
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 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: JSONB-API TCK
run: cd yasson-tck && mvn -U -B test -DargLine="-Djava.locale.providers=COMPAT"