| 
 | 1 | +# yamllint disable rule:line-length  | 
 | 2 | +# This workflow uses actions that are not certified by GitHub.  | 
 | 3 | +# They are provided by a third-party and are governed by  | 
 | 4 | +# separate terms of service, privacy policy, and support  | 
 | 5 | +# documentation.  | 
 | 6 | +# This workflow will build a Java project with Gradle and cache/restore any dependencies to improve the workflow execution time  | 
 | 7 | +# For more information see: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-java-with-gradle  | 
 | 8 | +# yamllint enable rule:line-length  | 
 | 9 | +---  | 
 | 10 | + | 
 | 11 | +name: Java CI Tests with Gradle  | 
 | 12 | + | 
 | 13 | +on: # yamllint disable-line rule:truthy  | 
 | 14 | +  push:  | 
 | 15 | +    branches: ["main"]  | 
 | 16 | +  pull_request:  | 
 | 17 | +    # The branches below must be a subset of the branches above  | 
 | 18 | +    branches: ["main"]  | 
 | 19 | +  workflow_dispatch:  | 
 | 20 | + | 
 | 21 | +permissions:  | 
 | 22 | +  contents: read  | 
 | 23 | + | 
 | 24 | +jobs:  | 
 | 25 | +  lint:  | 
 | 26 | +    name: Java Gradle CI LINT Checkstyle  | 
 | 27 | + | 
 | 28 | +    strategy:  | 
 | 29 | +      matrix:  | 
 | 30 | +        os: ["windows-2022", "ubuntu-24.04", "macos-14"]  | 
 | 31 | +        java: ['22', '23', '24']  | 
 | 32 | +    runs-on: ${{ matrix.os }}  | 
 | 33 | + | 
 | 34 | +    steps:  | 
 | 35 | +      - uses: actions/checkout@v4  | 
 | 36 | +      - name: Set up JDK  | 
 | 37 | +        uses: actions/setup-java@v4  | 
 | 38 | +        with:  | 
 | 39 | +          java-version: ${{ matrix.java }}  | 
 | 40 | +          distribution: temurin  | 
 | 41 | + | 
 | 42 | +      - name: Tool test  | 
 | 43 | +        run: |  | 
 | 44 | +          echo "Java version: ${{ matrix.java }}"  | 
 | 45 | +          java -version  | 
 | 46 | +          echo "OS: ${{ matrix.os }}"  | 
 | 47 | +          echo "Gradle version:"  | 
 | 48 | +          ./gradlew --version  | 
 | 49 | +      - name: Validate Gradle wrapper  | 
 | 50 | +        uses: gradle/actions/wrapper-validation@v4  | 
 | 51 | + | 
 | 52 | +      - name: Setup Gradle  | 
 | 53 | +        uses: gradle/actions/setup-gradle@v4  | 
 | 54 | + | 
 | 55 | +      - name: Clean  | 
 | 56 | +        run: ./gradlew --console=verbose clean  | 
 | 57 | + | 
 | 58 | +      - name: Lint  | 
 | 59 | +        run: ./gradlew --console=verbose checkstyleMain checkstyleTest  | 
0 commit comments