diff --git a/.github/workflows/Android_Develop_PR_Builder.yml b/.github/workflows/Android_Develop_PR_Builder.yml index 015d2d29..71b33841 100644 --- a/.github/workflows/Android_Develop_PR_Builder.yml +++ b/.github/workflows/Android_Develop_PR_Builder.yml @@ -12,10 +12,66 @@ defaults: working-directory: ./android jobs: - build: - name: PR Checker + ktlintCheck: + name: ktLint Check runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + - name: Gradle cache + uses: actions/cache@v3 + with: + path: | + ~/.gradle/caches + ~/.gradle/wrapper + key: ${{ runner.os }}-gradle-${{ hashFiles('**/*.gradle*') }} + restore-keys: | + ${{ runner.os }}-gradle- + + - name: set up JDK 17 + uses: actions/setup-java@v3 + with: + distribution: 'temurin' + java-version: 17 + + - name: Grant execute permission for gradlew + run: chmod +x gradlew + + - name: Lint Check + run: ./gradlew ktlintCheck + + testAlphaUnitTest: + name: Test Alpha Unit Test + runs-on: ubuntu-latest + + steps: + - uses: actions/checkout@v4 + - name: Gradle cache + uses: actions/cache@v3 + with: + path: | + ~/.gradle/caches + ~/.gradle/wrapper + key: ${{ runner.os }}-gradle-${{ hashFiles('**/*.gradle*') }} + restore-keys: | + ${{ runner.os }}-gradle- + + - name: set up JDK 17 + uses: actions/setup-java@v3 + with: + distribution: 'temurin' + java-version: 17 + + - name: Grant execute permission for gradlew + run: chmod +x gradlew + + - name: run alpha unit test + run: ./gradlew testAlphaUnitTest + + Distribution: + name: Alpha APK to Discord + runs-on: ubuntu-latest + needs: [ ktlintCheck, testAlphaUnitTest ] steps: - uses: actions/checkout@v4 - name: Gradle cache @@ -80,12 +136,6 @@ jobs: - name: Grant execute permission for gradlew run: chmod +x gradlew - # - name: Lint Check - # run: ./gradlew ktlintCheck - - # - name: run alpha unit test - # run: ./gradlew testAlphaUnitTest - - name: Build alpha APK run: ./gradlew assembleAlpha @@ -113,7 +163,9 @@ jobs: PR_TITLE: ${{ github.event.pull_request.title }} PR_URL: ${{ github.event.pull_request.html_url }} run: | - CONTENT="최신 개발 버전 APK 가 나왔어요!🎉 \n 배포 버전: $VERSION! \n 해당 PR 제목: $PR_TITLE" + CONTENT="최신 개발 버전 APK 가 나왔어요!🎉 + [배포 버전] : $VERSION! + [해당 PR 제목] : $PR_TITLE" EMBED=$(jq -n \ --arg title "PR Merged: $PR_TITLE" \ --arg url "$PR_URL" \