Tech | Fix | Lint setup for CI (#2286)

* Tech | Fix | Reduce tag size

* Tech | Enhancement | Move lint configuration to one place

* Tech | Enhancement | Enable Gradle quiet mode for errors logs only
This commit is contained in:
Sergey Boishtyan 2022-05-18 23:21:27 +03:00 committed by GitHub
parent 39046f787f
commit 79bcfcd811
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
8 changed files with 16 additions and 19 deletions

View File

@ -18,9 +18,9 @@ jobs:
amplitude_secret_debug: ${{ secrets.ANYTYPE_AMPLITUDE_DEBUG_SECRET }}
run: ./middleware2.sh $token_secret $user_secret $amplitude_secret $amplitude_secret_debug
- name: Compile android test sources
run: ./gradlew compileDebugAndroidTestSources
run: ./gradlew compileDebugAndroidTestSources -q
- name: Run unit tests
run: ./gradlew testDebugAll -Dpre-dex=false
run: ./gradlew testDebugAll -Dpre-dex=false -q
- name: Android test report
uses: asadmansr/android-test-report-action@v1.2.0
if: ${{ always() }} # IMPORTANT: run Android Test Report regardless

View File

@ -15,4 +15,4 @@ jobs:
amplitude_secret_debug: ${{ secrets.ANYTYPE_AMPLITUDE_DEBUG_SECRET }}
run: ./middleware2.sh $token_secret $user_secret $amplitude_secret $amplitude_secret_debug
- name: Run unit tests. Full mode.
run: ./gradlew build test -Dpre-dex=false
run: ./gradlew build test -Dpre-dex=false -q

View File

@ -85,13 +85,6 @@ android {
kotlinCompilerExtensionVersion config.compose_version
}
lint {
abortOnError false
disable 'InvalidPackage', 'OldTargetApi', 'IconDensities', 'IconMissingDensityFolder'
ignoreWarnings true
quiet true
}
buildFeatures {
viewBinding true
compose true

View File

@ -40,11 +40,13 @@ subprojects {
testDebugAll.dependsOn(tasks.named("test"))
}
plugins.withId("com.android.library") {
project.apply from: "$rootDir/lint.gradle"
afterEvaluate {
testDebugAll.dependsOn(tasks.named("testDebugUnitTest"))
}
}
plugins.withId("com.android.application") {
project.apply from: "$rootDir/lint.gradle"
afterEvaluate {
testDebugAll.dependsOn(tasks.named("testDebugUnitTest"))
}

View File

@ -31,10 +31,6 @@ android {
composeOptions {
kotlinCompilerExtensionVersion config["compose_version"]
}
lint {
abortOnError false
}
buildFeatures {
viewBinding true

10
lint.gradle Normal file
View File

@ -0,0 +1,10 @@
android {
lint {
abortOnError false
disable 'InvalidPackage', 'OldTargetApi', 'IconDensities', 'IconMissingDensityFolder', 'NullSafeMutableLiveData'
ignoreWarnings true
quiet true
checkReleaseBuilds false
checkDependencies false
}
}

View File

@ -14,10 +14,6 @@ android {
}
testOptions.unitTests.includeAndroidResources = true
lint {
disable 'NullSafeMutableLiveData'
}
}
dependencies {

View File

@ -37,7 +37,7 @@ abstract class BaseAddOptionsRelationViewModel(
val isMultiple = MutableStateFlow(true)
private val logger = Timber.tag("BaseAddOptionsRelationViewModel")
private val logger = Timber.tag("BaseAddOptionsRelation")
init {
viewModelScope.launch {