Skip to content

Commit

Permalink
Add reusable workflows for PRs and testing builds
Browse files Browse the repository at this point in the history
  • Loading branch information
esensar committed Sep 28, 2024
1 parent 4ed7c97 commit a19efbd
Show file tree
Hide file tree
Showing 7 changed files with 1,364 additions and 1 deletion.
9 changes: 9 additions & 0 deletions .github/workflows/pr.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
name: PR

on:
pull_request:
branches: [ master ]

jobs:
call-pr-workflow:
uses: FossifyOrg/.github/.github/workflows/pr.yml@main
10 changes: 10 additions & 0 deletions .github/workflows/testing-build.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
name: Testing build (on PR)

on:
pull_request:
branches: [ master ]
types: [ labeled, opened, synchronize, reopened ]

jobs:
call-testing-build-workflow:
uses: FossifyOrg/.github/.github/workflows/testing-build.yml@main
9 changes: 8 additions & 1 deletion app/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ import java.io.FileInputStream
plugins {
alias(libs.plugins.android)
alias(libs.plugins.kotlinAndroid)
alias(libs.plugins.detekt)
}

val keystorePropertiesFile: File = rootProject.file("keystore.properties")
Expand Down Expand Up @@ -89,10 +90,16 @@ android {

lint {
checkReleaseBuilds = false
abortOnError = false
abortOnError = true
warningsAsErrors = true
baseline = file("lint-baseline.xml")
}
}

detekt {
baseline = file("detekt-baseline.xml")
}

dependencies {
implementation(libs.fossify.commons)
implementation(libs.androidx.documentfile)
Expand Down
222 changes: 222 additions & 0 deletions app/detekt-baseline.xml

Large diffs are not rendered by default.

1,111 changes: 1,111 additions & 0 deletions app/lint-baseline.xml

Large diffs are not rendered by default.

1 change: 1 addition & 0 deletions build.gradle.kts
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
plugins {
alias(libs.plugins.android).apply(false)
alias(libs.plugins.kotlinAndroid).apply(false)
alias(libs.plugins.detekt).apply(false)
}
3 changes: 3 additions & 0 deletions gradle/libs.versions.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
[versions]
#jetbrains
kotlin = "1.9.10"
#Detekt
detekt = "1.23.3"
#AndroidX
androidx-swiperefreshlayout = "1.1.0"
androidx-documentfile = "1.0.1"
Expand Down Expand Up @@ -39,3 +41,4 @@ zip4j = { module = "net.lingala.zip4j:zip4j", version.ref = "zip4j" }
[plugins]
android = { id = "com.android.application", version.ref = "gradlePlugins-agp" }
kotlinAndroid = { id = "org.jetbrains.kotlin.android", version.ref = "kotlin" }
detekt = { id = "io.gitlab.arturbosch.detekt", version.ref = "detekt" }

0 comments on commit a19efbd

Please sign in to comment.