From f7199f4c395101a8358f8584f0a6f47c99d69e4a Mon Sep 17 00:00:00 2001 From: 8954sood <8954sood@naver.com> Date: Fri, 30 Aug 2024 22:01:03 +0900 Subject: [PATCH 1/4] ci: Set Teacher, Student Build CI --- .github/workflows/ci.yml | 22 +++++++++++++++++----- 1 file changed, 17 insertions(+), 5 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 7f3b4d29..64d1a391 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -1,14 +1,13 @@ name: Android CI on: - push: - branches: [ "develop", "main" ] pull_request: branches: [ "develop", "main" ] jobs: build: - + env: + TITLE: ${{ github.event.pull_request.title }} runs-on: ubuntu-latest steps: @@ -23,8 +22,21 @@ jobs: - name: Grant execute permission for gradlew run: chmod +x gradlew - - name: Run spotless + - name: Run Student spotless + if: startsWith($TITLE}, '[Student]') run: ./gradlew dodam-student:spotlessCheck - - name: Android Build with Gradle + - name: Android Student Build with Gradle + if: startsWith($TITLE}, '[Student]') run: ./gradlew dodam-student:clean assembleRelease --parallel + + - name: Run Teacher spotless + if: startsWith($TITLE}, '[Teacher]') + run: ./gradlew dodam-teacher-android:spotlessCheck + + - name: Android Teacher Build with Gradle + if: startsWith($TITLE}, '[Teacher]') + run: ./gradlew dodam-teacher-android:clean assembleRelease --parallel + + + From 7c7d062a135e0100812862eab0c4b5a7d7b3b014 Mon Sep 17 00:00:00 2001 From: 8954sood <8954sood@naver.com> Date: Fri, 30 Aug 2024 22:03:30 +0900 Subject: [PATCH 2/4] ci: fix invalid string --- .github/workflows/ci.yml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 64d1a391..395adb01 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -23,19 +23,19 @@ jobs: run: chmod +x gradlew - name: Run Student spotless - if: startsWith($TITLE}, '[Student]') + if: startsWith(env.TITLE, '[Student]') run: ./gradlew dodam-student:spotlessCheck - name: Android Student Build with Gradle - if: startsWith($TITLE}, '[Student]') + if: startsWith(env.TITLE, '[Student]') run: ./gradlew dodam-student:clean assembleRelease --parallel - name: Run Teacher spotless - if: startsWith($TITLE}, '[Teacher]') + if: startsWith(env.TITLE, '[Teacher]') run: ./gradlew dodam-teacher-android:spotlessCheck - name: Android Teacher Build with Gradle - if: startsWith($TITLE}, '[Teacher]') + if: startsWith(env.TITLE, '[Teacher]') run: ./gradlew dodam-teacher-android:clean assembleRelease --parallel From eb4d0fc7723fc4c540878f71c072ba352bdd868f Mon Sep 17 00:00:00 2001 From: 8954sood <8954sood@naver.com> Date: Fri, 30 Aug 2024 22:08:49 +0900 Subject: [PATCH 3/4] ci: test student ci --- .github/workflows/ci.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 395adb01..8dac7344 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -38,5 +38,7 @@ jobs: if: startsWith(env.TITLE, '[Teacher]') run: ./gradlew dodam-teacher-android:clean assembleRelease --parallel + + From c2ff0bb3992b6282c736d90877fbaabba073e89f Mon Sep 17 00:00:00 2001 From: 8954sood <8954sood@naver.com> Date: Fri, 30 Aug 2024 22:12:34 +0900 Subject: [PATCH 4/4] ci: Add Core Build CI --- .github/workflows/ci.yml | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 8dac7344..1609ddc4 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -38,7 +38,15 @@ jobs: if: startsWith(env.TITLE, '[Teacher]') run: ./gradlew dodam-teacher-android:clean assembleRelease --parallel - + - name: Android Core Build with Gradle + if: startsWith(env.TITLE, '[Core]') + run: ./gradlew spotlessCheck + + - name: Android Core Build with Gradle + if: startsWith(env.TITLE, '[Core]') + run: | + ./gradlew dodam-teacher-android:clean assembleRelease --parallel + ./gradlew dodam-student:assembleRelease --parallel