diff options
author | Keuin <[email protected]> | 2022-09-24 10:56:31 +0800 |
---|---|---|
committer | Keuin <[email protected]> | 2022-09-25 19:31:34 +0800 |
commit | fac973923d378c7111ba04114ca145b7ba03dfb9 (patch) | |
tree | 3872875a30f18d6e14194a659a055a20285be17e | |
parent | 7b3c27168d969ea53e5a39a055b8d00cd5c7d05e (diff) |
Test with GitHub actions.
-rw-r--r-- | .github/workflows/unit-test.yml | 32 |
1 files changed, 32 insertions, 0 deletions
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 |