mirror of
https://github.com/FossifyOrg/Launcher.git
synced 2025-12-23 23:58:13 -05:00
Add simple GitHub action for static checks and tests
Enabled android lint, added detekt and created github workflow for PRs. Related to discussion: https://github.com/orgs/FossifyOrg/discussions/83
This commit is contained in:
26
.github/workflows/pr.yml
vendored
Normal file
26
.github/workflows/pr.yml
vendored
Normal file
@@ -0,0 +1,26 @@
|
||||
name: PR
|
||||
|
||||
on:
|
||||
pull_request: [ main ]
|
||||
|
||||
jobs:
|
||||
android-lint:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
- name: Run Android lint
|
||||
run: ./gradlew lint
|
||||
|
||||
detekt:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
- name: Run detekt checks
|
||||
run: ./gradlew detekt
|
||||
|
||||
test:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
- name: Run tests
|
||||
run: ./gradlew :app:testCoreDebugUnitTest
|
||||
@@ -6,6 +6,7 @@ plugins {
|
||||
alias(libs.plugins.android)
|
||||
alias(libs.plugins.kotlinAndroid)
|
||||
alias(libs.plugins.ksp)
|
||||
alias(libs.plugins.detekt)
|
||||
base
|
||||
}
|
||||
|
||||
@@ -90,7 +91,8 @@ android {
|
||||
|
||||
lint {
|
||||
checkReleaseBuilds = false
|
||||
abortOnError = false
|
||||
abortOnError = true
|
||||
warningsAsErrors = true
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -2,4 +2,5 @@ plugins {
|
||||
alias(libs.plugins.android).apply(false)
|
||||
alias(libs.plugins.kotlinAndroid).apply(false)
|
||||
alias(libs.plugins.ksp).apply(false)
|
||||
alias(libs.plugins.detekt).apply(false)
|
||||
}
|
||||
|
||||
@@ -3,6 +3,8 @@
|
||||
kotlin = "1.9.0"
|
||||
#KSP
|
||||
ksp = "1.9.0-1.0.12"
|
||||
#Detekt
|
||||
detekt = "1.23.3"
|
||||
#Room
|
||||
room = "2.6.0-alpha02"
|
||||
#Simple tools
|
||||
@@ -35,3 +37,4 @@ room = [
|
||||
android = { id = "com.android.application", version.ref = "gradlePlugins-agp" }
|
||||
kotlinAndroid = { id = "org.jetbrains.kotlin.android", version.ref = "kotlin" }
|
||||
ksp = { id = "com.google.devtools.ksp", version.ref = "ksp" }
|
||||
detekt = { id = "io.gitlab.arturbosch.detekt", version.ref = "detekt" }
|
||||
|
||||
Reference in New Issue
Block a user