Skip to content

Commit

Permalink
클린 빌드 시에도 테스트 코드를 실행하도록 수정 (#380)
Browse files Browse the repository at this point in the history
* Revert "빌드시 테스트 태스크 제외시키고 CI에서만 돌리기 (#362)"

This reverts commit 6177d50.

* gradle: 오타 제거
  • Loading branch information
mwy3055 authored Nov 13, 2024
1 parent 26db5eb commit e3189d8
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 14 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/android-develop.yml
Original file line number Diff line number Diff line change
Expand Up @@ -42,8 +42,8 @@ jobs:

# Build Debug App
- name: Build with Gradle
run: ./gradlew :app:assembleDebug -PisCI=true
run: ./gradlew :app:assembleDebug

# Run unit test
- name: Run unit test
run: ./gradlew testdebugUnitTest
run: ./gradlew testDebugUnitTest
8 changes: 4 additions & 4 deletions .github/workflows/android-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -37,20 +37,20 @@ jobs:
echo '${{ secrets.KU_RING_KEY_STORE_JKS }}' | base64 -d > ./app/signing/ku_ring_keystore.jks
echo '${{ secrets.KEY_STORE_PROPERTIES }}' > ./app/signing/keystore.properties
- name: Create local.properteis
- name: Create local.properties
run: echo '${{ secrets.LOCAL_PROPERTIES }}' > ./local.properties

# Run unit test
- name: Run unit test
run: ./gradlew testreleaseUnitTest
run: ./gradlew testReleaseUnitTest

# Build APK Release
- name: Build release Apk
run: ./gradlew :app:assembleRelease -PisCI=true
run: ./gradlew :app:assembleRelease

# Build AAB Release
- name: Build release Bundle
run: ./gradlew :app:bundleRelease -PisCI=true
run: ./gradlew :app:bundleRelease

# Upload AAB
- name: Upload a Build AAB Artifact
Expand Down
Original file line number Diff line number Diff line change
@@ -1,14 +1,13 @@
package com.ku_stacks.ku_ring.buildlogic.convention

import com.android.build.api.dsl.ApplicationExtension
import com.android.build.api.dsl.LibraryExtension
import com.android.build.gradle.tasks.factory.AndroidUnitTest
import com.ku_stacks.ku_ring.buildlogic.dsl.configureAndroidLibrary
import com.ku_stacks.ku_ring.buildlogic.primitive.CommonAndroidPlugin
import com.ku_stacks.ku_ring.buildlogic.primitive.HiltPlugin
import com.ku_stacks.ku_ring.buildlogic.primitive.KotlinPlugin
import org.gradle.api.Plugin
import org.gradle.api.Project
import org.gradle.api.tasks.testing.Test
import org.gradle.kotlin.dsl.apply
import org.gradle.kotlin.dsl.configure

Expand All @@ -33,12 +32,6 @@ class FeaturePlugin: Plugin<Project> {
proguardFiles(getDefaultProguardFile("proguard-android-optimize.txt"), "proguard-rules.pro")
}
}
tasks.withType(Test::class.java).configureEach {
enabled = project.hasProperty("isCI") && project.property("isCI") == "true"
}
tasks.withType(AndroidUnitTest::class.java).configureEach {
enabled = project.hasProperty("isCI") && project.property("isCI") == "true"
}
}
}
}

0 comments on commit e3189d8

Please sign in to comment.