From 3870ef3c6d0e01aa89ce08c4eff9b773bd031fd2 Mon Sep 17 00:00:00 2001 From: Lee Dong-Yeon <83625797+easternkite@users.noreply.github.com> Date: Tue, 3 Dec 2024 00:20:23 +0900 Subject: [PATCH] Add test workflow (#61) * Add test workflow * Add jdk setting step * Add caching gradle cache step * Add setting up android sdk step --- .github/workflows/check_test.yml | 42 ++++++++++++++++++++++++++++++++ 1 file changed, 42 insertions(+) create mode 100644 .github/workflows/check_test.yml diff --git a/.github/workflows/check_test.yml b/.github/workflows/check_test.yml new file mode 100644 index 0000000..a4f28c8 --- /dev/null +++ b/.github/workflows/check_test.yml @@ -0,0 +1,42 @@ +name: Check Test +on: [pull_request] + +jobs: + build: + runs-on: ubuntu-latest + + steps: + - uses: actions/checkout@v4 + + - name: Restore cached gradle + id: cache-gradle-restore + uses: actions/cache/restore@v4 + with: + path: | + ~/.gradle/caches + ~/.gradle/wrapper + key: ${{ runner.os }}-gradle-caches + + - name: Setup Java + uses: actions/setup-java@v4 + with: + distribution: 'temurin' + java-version: '17' + + - name: Setup Android SDK + uses: android-actions/setup-android@v3 + + - name: Check Unit Test + run: ./gradlew :eungabi:testDebugUnitTest + + - name: Check Desktop Test + run: ./gradlew :eungabi:desktopTest + + - name: Cache gradle caches + id: cache-gradle-save + uses: actions/cache@v4 + with: + path: | + ~/.gradle/caches + ~/.gradle/wrapper + key: ${{ steps.cache-gradle-restore.outputs.cache-primary-key }}