From fac973923d378c7111ba04114ca145b7ba03dfb9 Mon Sep 17 00:00:00 2001 From: Keuin Date: Sat, 24 Sep 2022 10:56:31 +0800 Subject: Test with GitHub actions. --- .github/workflows/unit-test.yml | 32 ++++++++++++++++++++++++++++++++ 1 file changed, 32 insertions(+) create mode 100644 .github/workflows/unit-test.yml diff --git a/.github/workflows/unit-test.yml b/.github/workflows/unit-test.yml new file mode 100644 index 0000000..1283128 --- /dev/null +++ b/.github/workflows/unit-test.yml @@ -0,0 +1,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' \ No newline at end of file -- cgit v1.2.3