Skip to content

Commit

Permalink
Merge pull request #2 from depromeet/init-ci-setting
Browse files Browse the repository at this point in the history
init : CI, Git Setting
  • Loading branch information
t1nm1ksun authored Feb 12, 2025
2 parents 838fbac + 608d1ef commit cdc5f5b
Show file tree
Hide file tree
Showing 12 changed files with 112 additions and 18 deletions.
5 changes: 4 additions & 1 deletion .github/ISSUE_TEMPLATE/team6-issue-template.md
Original file line number Diff line number Diff line change
@@ -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 🏃‍♀️
- [ ]
13 changes: 13 additions & 0 deletions .github/team6-pull-request-template.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
## Related issue 🛠
- closed #이슈넘버

## Work Description ✏️
- 작업 내용

## Screenshot 📸
<img src="" width="360"/>

## Uncompleted Tasks 😅
- [ ] Task1

## To Reviewers 📢
79 changes: 79 additions & 0 deletions .github/workflows/android_ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,79 @@
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

- 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: '에러를 확인해 주세요 🫨'
5 changes: 3 additions & 2 deletions app/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down Expand Up @@ -56,4 +57,4 @@ dependencies {
androidTestImplementation(libs.androidx.ui.test.junit4)
debugImplementation(libs.androidx.ui.tooling)
debugImplementation(libs.androidx.ui.test.manifest)
}
}
Original file line number Diff line number Diff line change
@@ -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.
*
Expand All @@ -21,4 +19,4 @@ class ExampleInstrumentedTest {
val appContext = InstrumentationRegistry.getInstrumentation().targetContext
assertEquals("com.depromeet.team6", appContext.packageName)
}
}
}
4 changes: 2 additions & 2 deletions app/src/main/java/com/depromeet/team6/MainActivity.kt
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ class MainActivity : ComponentActivity() {
@Composable
fun Greeting(name: String, modifier: Modifier = Modifier) {
Text(
text = "Hello $name!",
text = "슬랙 알림 진짜 안가용가리?! ㅠㅠ",
modifier = modifier
)
}
Expand All @@ -44,4 +44,4 @@ fun GreetingPreview() {
Team6Theme {
Greeting("Android")
}
}
}
2 changes: 1 addition & 1 deletion app/src/main/java/com/depromeet/team6/ui/theme/Color.kt
Original file line number Diff line number Diff line change
Expand Up @@ -8,4 +8,4 @@ val Pink80 = Color(0xFFEFB8C8)

val Purple40 = Color(0xFF6650a4)
val PurpleGrey40 = Color(0xFF625b71)
val Pink40 = Color(0xFF7D5260)
val Pink40 = Color(0xFF7D5260)
3 changes: 1 addition & 2 deletions app/src/main/java/com/depromeet/team6/ui/theme/Theme.kt
Original file line number Diff line number Diff line change
@@ -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
Expand Down Expand Up @@ -55,4 +54,4 @@ fun Team6Theme(
typography = Typography,
content = content
)
}
}
2 changes: 1 addition & 1 deletion app/src/main/java/com/depromeet/team6/ui/theme/Type.kt
Original file line number Diff line number Diff line change
Expand Up @@ -31,4 +31,4 @@ val Typography = Typography(
letterSpacing = 0.5.sp
)
*/
)
)
5 changes: 2 additions & 3 deletions app/src/test/java/com/depromeet/team6/ExampleUnitTest.kt
Original file line number Diff line number Diff line change
@@ -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).
*
Expand All @@ -14,4 +13,4 @@ class ExampleUnitTest {
fun addition_isCorrect() {
assertEquals(4, 2 + 2)
}
}
}
3 changes: 2 additions & 1 deletion build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -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
}
alias(libs.plugins.ktlint) apply false
}
1 change: 1 addition & 0 deletions gradle/libs.versions.toml
Original file line number Diff line number Diff line change
Expand Up @@ -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"

0 comments on commit cdc5f5b

Please sign in to comment.