From 99cda660f72bad553c703d0ab069bc2fb07f4803 Mon Sep 17 00:00:00 2001 From: t1nm1ksun Date: Mon, 3 Feb 2025 13:15:43 +0900 Subject: [PATCH 1/5] init : issue template, pr template setting --- .github/ISSUE_TEMPLATE/team6-issue-template.md | 5 ++++- .github/team6-pull-request-template.md | 13 +++++++++++++ 2 files changed, 17 insertions(+), 1 deletion(-) create mode 100644 .github/team6-pull-request-template.md diff --git a/.github/ISSUE_TEMPLATE/team6-issue-template.md b/.github/ISSUE_TEMPLATE/team6-issue-template.md index 071d16e..78149f7 100644 --- a/.github/ISSUE_TEMPLATE/team6-issue-template.md +++ b/.github/ISSUE_TEMPLATE/team6-issue-template.md @@ -1,10 +1,13 @@ --- name: Team6 Issue Template -about: Describe this issue template's purpose here. +about: "디프만 16기 6팀 안드로이드 이슈 템플릿 \U0001F680" title: '' labels: '' assignees: '' --- +## What is this issue? 🛠 +## Progress 🏃‍♀️ +- [ ] diff --git a/.github/team6-pull-request-template.md b/.github/team6-pull-request-template.md new file mode 100644 index 0000000..8a0c26b --- /dev/null +++ b/.github/team6-pull-request-template.md @@ -0,0 +1,13 @@ +## Related issue 🛠 +- closed #이슈넘버 + +## Work Description ✏️ +- 작업 내용 + +## Screenshot 📸 + + +## Uncompleted Tasks 😅 +- [ ] Task1 + +## To Reviewers 📢 \ No newline at end of file From a808dc8420ea80718d55587339781ca46d44bf40 Mon Sep 17 00:00:00 2001 From: t1nm1ksun Date: Mon, 3 Feb 2025 13:35:20 +0900 Subject: [PATCH 2/5] =?UTF-8?q?init=20:=20ktlint=20=EC=B6=94=EA=B0=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/workflows/android_ci.yml | 60 +++++++++++++++++++ app/build.gradle.kts | 5 +- .../team6/ExampleInstrumentedTest.kt | 8 +-- build.gradle.kts | 3 +- gradle/libs.versions.toml | 1 + 5 files changed, 69 insertions(+), 8 deletions(-) create mode 100644 .github/workflows/android_ci.yml diff --git a/.github/workflows/android_ci.yml b/.github/workflows/android_ci.yml new file mode 100644 index 0000000..2a8586c --- /dev/null +++ b/.github/workflows/android_ci.yml @@ -0,0 +1,60 @@ +name: Team6 CI +on: + pull_request: + branches: [ develop, main ] + +defaults: + run: + shell: bash + working-directory: . + +jobs: + build: + name: CI + runs-on: ubuntu-latest + steps: + - name: Checkout + uses: actions/checkout@v2 + + - name: Gradle cache + uses: actions/cache@v2 + 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: + java-version: 17 + distribution: 'temurin' + + - name: Change gradlew permissions + run: chmod +x ./gradlew + + - name: Grant execute permission for gradlew + run: chmod +x gradlew + + - name: Touch local properties + run: touch local.properties + + - name: Decode google-services.json + env: + FIREBASE_SECRET: ${{ secrets.FIREBASE_SECRET }} + run: echo $FIREBASE_SECRET > app/google-services.json + + - name: Access local properties + env: + HFM_BASE_URL: ${{ secrets.BASE_URL }} + run: | + echo "dev.base.url=\"$BASE_URL\"" >> local.properties + + - name: Lint Check + run: ./gradlew ktlintCheck -PcompileSdkVersion=34 + + - name: Build with Gradle + run: ./gradlew build -PcompileSdkVersion=34 + diff --git a/app/build.gradle.kts b/app/build.gradle.kts index 68c0d7c..6d86f47 100644 --- a/app/build.gradle.kts +++ b/app/build.gradle.kts @@ -2,11 +2,12 @@ plugins { alias(libs.plugins.android.application) alias(libs.plugins.kotlin.android) alias(libs.plugins.kotlin.compose) + alias(libs.plugins.ktlint) } android { namespace = "com.depromeet.team6" - compileSdk = 34 + compileSdk = 35 defaultConfig { applicationId = "com.depromeet.team6" @@ -56,4 +57,4 @@ dependencies { androidTestImplementation(libs.androidx.ui.test.junit4) debugImplementation(libs.androidx.ui.tooling) debugImplementation(libs.androidx.ui.test.manifest) -} \ No newline at end of file +} diff --git a/app/src/androidTest/java/com/depromeet/team6/ExampleInstrumentedTest.kt b/app/src/androidTest/java/com/depromeet/team6/ExampleInstrumentedTest.kt index 8b594bb..5f96d32 100644 --- a/app/src/androidTest/java/com/depromeet/team6/ExampleInstrumentedTest.kt +++ b/app/src/androidTest/java/com/depromeet/team6/ExampleInstrumentedTest.kt @@ -1,13 +1,11 @@ package com.depromeet.team6 -import androidx.test.platform.app.InstrumentationRegistry import androidx.test.ext.junit.runners.AndroidJUnit4 - +import androidx.test.platform.app.InstrumentationRegistry +import org.junit.Assert.assertEquals import org.junit.Test import org.junit.runner.RunWith -import org.junit.Assert.* - /** * Instrumented test, which will execute on an Android device. * @@ -21,4 +19,4 @@ class ExampleInstrumentedTest { val appContext = InstrumentationRegistry.getInstrumentation().targetContext assertEquals("com.depromeet.team6", appContext.packageName) } -} \ No newline at end of file +} diff --git a/build.gradle.kts b/build.gradle.kts index 952b930..cd2d9ba 100644 --- a/build.gradle.kts +++ b/build.gradle.kts @@ -3,4 +3,5 @@ plugins { alias(libs.plugins.android.application) apply false alias(libs.plugins.kotlin.android) apply false alias(libs.plugins.kotlin.compose) apply false -} \ No newline at end of file + alias(libs.plugins.ktlint) apply false +} diff --git a/gradle/libs.versions.toml b/gradle/libs.versions.toml index e6e2317..7856d08 100644 --- a/gradle/libs.versions.toml +++ b/gradle/libs.versions.toml @@ -29,4 +29,5 @@ androidx-material3 = { group = "androidx.compose.material3", name = "material3" android-application = { id = "com.android.application", version.ref = "agp" } kotlin-android = { id = "org.jetbrains.kotlin.android", version.ref = "kotlin" } kotlin-compose = { id = "org.jetbrains.kotlin.plugin.compose", version.ref = "kotlin" } +ktlint = "org.jlleitschuh.gradle.ktlint:11.5.1" From 83a28b1e7ff2a88eb33fd7251e8049d7baf23bf1 Mon Sep 17 00:00:00 2001 From: t1nm1ksun Date: Mon, 3 Feb 2025 13:35:39 +0900 Subject: [PATCH 3/5] chore : ktlintFormat --- app/src/main/java/com/depromeet/team6/MainActivity.kt | 2 +- app/src/main/java/com/depromeet/team6/ui/theme/Color.kt | 2 +- app/src/main/java/com/depromeet/team6/ui/theme/Theme.kt | 3 +-- app/src/main/java/com/depromeet/team6/ui/theme/Type.kt | 2 +- app/src/test/java/com/depromeet/team6/ExampleUnitTest.kt | 5 ++--- 5 files changed, 6 insertions(+), 8 deletions(-) diff --git a/app/src/main/java/com/depromeet/team6/MainActivity.kt b/app/src/main/java/com/depromeet/team6/MainActivity.kt index 57f34e2..e62384c 100644 --- a/app/src/main/java/com/depromeet/team6/MainActivity.kt +++ b/app/src/main/java/com/depromeet/team6/MainActivity.kt @@ -44,4 +44,4 @@ fun GreetingPreview() { Team6Theme { Greeting("Android") } -} \ No newline at end of file +} diff --git a/app/src/main/java/com/depromeet/team6/ui/theme/Color.kt b/app/src/main/java/com/depromeet/team6/ui/theme/Color.kt index e63fe1c..03a7f98 100644 --- a/app/src/main/java/com/depromeet/team6/ui/theme/Color.kt +++ b/app/src/main/java/com/depromeet/team6/ui/theme/Color.kt @@ -8,4 +8,4 @@ val Pink80 = Color(0xFFEFB8C8) val Purple40 = Color(0xFF6650a4) val PurpleGrey40 = Color(0xFF625b71) -val Pink40 = Color(0xFF7D5260) \ No newline at end of file +val Pink40 = Color(0xFF7D5260) diff --git a/app/src/main/java/com/depromeet/team6/ui/theme/Theme.kt b/app/src/main/java/com/depromeet/team6/ui/theme/Theme.kt index 0cdbc7f..c2ffe65 100644 --- a/app/src/main/java/com/depromeet/team6/ui/theme/Theme.kt +++ b/app/src/main/java/com/depromeet/team6/ui/theme/Theme.kt @@ -1,6 +1,5 @@ package com.depromeet.team6.ui.theme -import android.app.Activity import android.os.Build import androidx.compose.foundation.isSystemInDarkTheme import androidx.compose.material3.MaterialTheme @@ -55,4 +54,4 @@ fun Team6Theme( typography = Typography, content = content ) -} \ No newline at end of file +} diff --git a/app/src/main/java/com/depromeet/team6/ui/theme/Type.kt b/app/src/main/java/com/depromeet/team6/ui/theme/Type.kt index 603e88f..656399e 100644 --- a/app/src/main/java/com/depromeet/team6/ui/theme/Type.kt +++ b/app/src/main/java/com/depromeet/team6/ui/theme/Type.kt @@ -31,4 +31,4 @@ val Typography = Typography( letterSpacing = 0.5.sp ) */ -) \ No newline at end of file +) diff --git a/app/src/test/java/com/depromeet/team6/ExampleUnitTest.kt b/app/src/test/java/com/depromeet/team6/ExampleUnitTest.kt index f2ed2e1..d9f2017 100644 --- a/app/src/test/java/com/depromeet/team6/ExampleUnitTest.kt +++ b/app/src/test/java/com/depromeet/team6/ExampleUnitTest.kt @@ -1,9 +1,8 @@ package com.depromeet.team6 +import org.junit.Assert.assertEquals import org.junit.Test -import org.junit.Assert.* - /** * Example local unit test, which will execute on the development machine (host). * @@ -14,4 +13,4 @@ class ExampleUnitTest { fun addition_isCorrect() { assertEquals(4, 2 + 2) } -} \ No newline at end of file +} From 9adfc12bccf8f0df7adab07fbd747e4ac18a0933 Mon Sep 17 00:00:00 2001 From: t1nm1ksun Date: Tue, 4 Feb 2025 22:13:07 +0900 Subject: [PATCH 4/5] =?UTF-8?q?[Feat]=20git=20action=20slack=20=EC=95=8C?= =?UTF-8?q?=EB=A6=BC=20=EC=97=B0=EB=8F=99?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/workflows/android_ci.yml | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) diff --git a/.github/workflows/android_ci.yml b/.github/workflows/android_ci.yml index 2a8586c..bde8a6e 100644 --- a/.github/workflows/android_ci.yml +++ b/.github/workflows/android_ci.yml @@ -58,3 +58,22 @@ jobs: - name: Build with Gradle run: ./gradlew build -PcompileSdkVersion=34 + - name: Slack Notify - Success + if: ${{ success() }} + uses: rtCamp/action-slack-notify@v2 + env: + SLACK_COLOR: '#B7FF1D' + SLACK_WEBHOOK: ${{ secrets.SLACK_WEBHOOK_URL }} + SLACK_TITLE: '✅ PR Success ✅' + SLACK_USERNAME: DEPORMEET-TEAM6 🍗 + SLACK_MESSAGE: 'PR이 완료되었습니다! 😆‍' + + - name: Slack Notify - Failure + if: ${{ failure() }} + uses: rtCamp/action-slack-notify@v2 + env: + SLACK_COLOR: '#FF9254' + SLACK_WEBHOOK: ${{ secrets.SLACK_WEBHOOK_URL }} + SLACK_TITLE: '❌ PR Failed ❌' + SLACK_USERNAME: DEPORMEET-TEAM6 🍗 + SLACK_MESSAGE: '에러를 확인해 주세요 🫨' From 608d1ef00c12202bc5e81cf8db33c3591a8af753 Mon Sep 17 00:00:00 2001 From: t1nm1ksun Date: Wed, 5 Feb 2025 21:04:00 +0900 Subject: [PATCH 5/5] =?UTF-8?q?test=20:=20=EC=8A=AC=EB=9E=99=20=EC=95=8C?= =?UTF-8?q?=EB=A6=BC=20=ED=85=8C=EC=8A=A4=ED=8A=B8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/src/main/java/com/depromeet/team6/MainActivity.kt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/src/main/java/com/depromeet/team6/MainActivity.kt b/app/src/main/java/com/depromeet/team6/MainActivity.kt index e62384c..74d9135 100644 --- a/app/src/main/java/com/depromeet/team6/MainActivity.kt +++ b/app/src/main/java/com/depromeet/team6/MainActivity.kt @@ -33,7 +33,7 @@ class MainActivity : ComponentActivity() { @Composable fun Greeting(name: String, modifier: Modifier = Modifier) { Text( - text = "Hello $name!", + text = "슬랙 알림 진짜 안가용가리?! ㅠㅠ", modifier = modifier ) }