Skip to content

feat(java): genkit java #3

feat(java): genkit java

feat(java): genkit java #3

Workflow file for this run

# Copyright 2025 Google LLC
#
# Licensed 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.
#
# SPDX-License-Identifier: Apache-2.0
name: Java tests and checks
on:
pull_request:
paths:
- "java/**"
- "genkit-tools/**"
- ".github/workflows/java.yml"
jobs:
build:
runs-on: ubuntu-latest
strategy:
matrix:
java-version: ['17', '21']
steps:
- name: Checkout Repo
uses: actions/checkout@v4
- name: Set up JDK ${{ matrix.java-version }}
uses: actions/setup-java@v4
with:
java-version: ${{ matrix.java-version }}
distribution: 'temurin'
cache: 'maven'
- name: Build with Maven
run: mvn -B clean compile -q
working-directory: ./java
- name: Run tests
run: mvn -B test
working-directory: ./java
lint:
runs-on: ubuntu-latest
steps:
- name: Checkout Repo
uses: actions/checkout@v4
- name: Set up JDK 17
uses: actions/setup-java@v4
with:
java-version: '17'
distribution: 'temurin'
cache: 'maven'
- name: Check code formatting with Spotless
run: mvn -B spotless:check
working-directory: ./java
- name: Run Checkstyle
run: mvn -B checkstyle:check
working-directory: ./java