summaryrefslogtreecommitdiff
path: root/.github/workflows/unit-test.yml
blob: 1283128953dda7c68834008ad2416a1dcb4a217d (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
name: Java CI

on: [ push ]

jobs:
  gradle-test:
    strategy:
      matrix:
        os: [ ubuntu-latest, macos-latest, windows-latest ]
    runs-on: ${{ matrix.os }}

    steps:
      - uses: actions/checkout@v3
      - name: Set up JDK
        uses: actions/setup-java@v3
        with:
          distribution: adopt
          java-version: 17
      - name: Validate Gradle wrapper
        uses: gradle/wrapper-validation-action@v1
      - name: Setup Gradle Build
        uses: gradle/gradle-build-action@v2
      - name: Add gradlew Execution Permission
        if: matrix.os != 'windows-latest'
        run: chmod +x ./gradlew
      - name: Execute Gradle build
        run: ./gradlew build
      - name: Get Test Report
        uses: mikepenz/action-junit-report@v3
        if: always() # always run even if the previous step fails
        with:
          report_paths: '**/build/test-results/test/TEST-*.xml'