Skip to content

Merge pull request #340 from kit-data-manager/renovate/github-codeql-… #1035

Merge pull request #340 from kit-data-manager/renovate/github-codeql-…

Merge pull request #340 from kit-data-manager/renovate/github-codeql-… #1035

Workflow file for this run

# This workflow uses actions that are not certified by GitHub.
# They are provided by a third-party and are governed by
# separate terms of service, privacy policy, and support
# documentation.
# This workflow will build a Java project with Gradle and cache/restore any dependencies to improve the workflow execution time
# For more information see: https://help.github.com/actions/language-and-framework-guides/building-and-testing-java-with-gradle
name: Build & Tests
on:
push:
branches: [main, development]
pull_request:
workflow_dispatch:
jobs:
build:
strategy:
matrix:
os: [ubuntu-latest, macos-latest, windows-latest]
jdk: [17, 21, 25, 26] # (open)JDK releases
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7
- name: Set up openJDK version
uses: actions/setup-java@ad2b38190b15e4d6bdf0c97fb4fca8412226d287 # v5.3.0
with:
java-version: ${{ matrix.jdk }}
distribution: "zulu"
- name: Install Dependencies
run: npm install -g ro-crate-html-js
- name: Setup Gradle
uses: gradle/actions/setup-gradle@5e2ebd065dc2488b7a6ad670704656cbbe1e8f60 # v6
- name: Build and Test with Gradle
run: ./gradlew -Dprofile=release build
- name: Upload (test) reports as artifact on GitHub on manual runs
if: github.event_name == 'workflow_dispatch'
uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1
with:
name: test-report ${{ matrix.os }} JDK ${{ matrix.jdk }}
path: build/reports
coverage:
needs: build
runs-on: ubuntu-latest
env:
jdkversion: 25
steps:
- name: Checkout repo
uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7
- name: Set up OpenJDK version ...
uses: actions/setup-java@ad2b38190b15e4d6bdf0c97fb4fca8412226d287 # v5.3.0
with:
distribution: "zulu"
java-version: ${{ env.jdkversion }}
- name: Install Dependencies
run: npm install -g ro-crate-html-js
- name: Grant execute permission for gradlew
run: chmod +x gradlew
- name: Build with Gradle (JDK ${{ env.jdkversion }})
run: ./gradlew clean check jacocoTestReport
- name: Codecov
uses: codecov/codecov-action@fb8b3582c8e4def4969c97caa2f19720cb33a72f # v7
with:
files: ./build/reports/jacoco/test/jacocoTestReport.xml #optional
- name: Compile Javadoc
run: ./gradlew javadoc