Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
32 commits
Select commit Hold shift + click to select a range
f39bf58
add gitHub action for test coverage check
Radwa85 Jun 30, 2025
5c3dbd8
add JaCoCo for code coverage analysis
Radwa85 Jun 30, 2025
175a20b
rename build job to test-coverage in ci workflow
Radwa85 Jun 30, 2025
3a07510
disable XML report for test coverage
Radwa85 Jun 30, 2025
c19078c
fix Jacoco report path for github actions
Radwa85 Jun 30, 2025
425c20d
enable XML report for JaCoCo test coverage
Radwa85 Jun 30, 2025
97be819
verify test tasks in ci workflow
Radwa85 Jun 30, 2025
80ed24c
add JacocoCoverageVerification for code coverage
Radwa85 Jun 30, 2025
33041f9
update GitHub workflow Java version to 22
Radwa85 Jun 30, 2025
fbcb0ea
Update Java version to 22 and Jacoco version
Radwa85 Jun 30, 2025
44698ef
update excludes in app/build.gradle.kts
Radwa85 Jun 30, 2025
e251998
return Java version to 11
Radwa85 Jun 30, 2025
4d6b1d3
rename ci workflow file
Radwa85 Jun 30, 2025
1826fc7
remove JaCoCo from debug build type
Radwa85 Jun 30, 2025
37d623f
simplify and remove duplication in Jacoco coverage check step
Radwa85 Jul 1, 2025
bf90e37
refactor Jacoco file filter for reuse
Radwa85 Jul 1, 2025
623343e
integrate Codecov for test coverage reporting
Radwa85 Jul 1, 2025
6026827
update Java version for test coverage workflow
Radwa85 Jul 1, 2025
509cab3
remove Greeting composable and its preview
Radwa85 Jul 1, 2025
d839394
replace JaCoCo with Kover for code coverage
Radwa85 Jul 1, 2025
d34e8a9
add kover to libs.versions.toml
Radwa85 Jul 1, 2025
fe4b88a
replaced Jacoco with Kover and automated coverage check using koverVe…
Radwa85 Jul 1, 2025
7f17f28
use all project instead of sub project
Radwa85 Jul 3, 2025
0456e61
use v4 instead of v3 , cache gradle,add main branch and use java 17
Radwa85 Jul 3, 2025
403bba5
use v4 instead of v3 , cache gradle,add main branch and use java 17
Radwa85 Jul 3, 2025
ebc7da0
use v4 instead of v3 , cache gradle,add main branch and use java 17
Radwa85 Jul 3, 2025
3ef0fe5
use v4 instead of v3 , cache gradle,add main branch and use java 17
Radwa85 Jul 3, 2025
5c7fd67
use v4 instead of v3 , cache gradle,add main branch and use java 17
Radwa85 Jul 3, 2025
d8e075c
refactor kover excluded packages in build.gradle.kts
Radwa85 Jul 3, 2025
368e007
Merge remote-tracking branch 'origin/development' into task/ci-test-c…
Radwa85 Jul 3, 2025
27b1cfa
Merge remote-tracking branch 'origin/development' into task/ci-test-c…
Radwa85 Jul 3, 2025
bf3175c
enable typesafe project accessors
Radwa85 Jul 3, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
34 changes: 34 additions & 0 deletions .github/workflows/ci_test_coverage.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
name: CI - Test Coverage Check

on:
pull_request:
branches: [main, development]

jobs:
test-coverage:
runs-on: ubuntu-latest

steps:
- name: Checkout code
uses: actions/checkout@v4

- name: Set up JDK
uses: actions/setup-java@v4
with:
java-version: '17'
distribution: 'temurin'
cache: 'gradle'

- name: Grant permission for Gradle
run: chmod +x ./gradlew

- name: Run Unit Tests with Kover Coverage
run: ./gradlew test koverVerify koverXmlReport koverHtmlReport

- name: Upload Coverage to Codecov
uses: codecov/codecov-action@v4
with:
token: ${{ secrets.CODECOV_TOKEN }}
files: build/reports/kover/merged/report.xml
flags: unittests
name: novix-coverage-report
25 changes: 2 additions & 23 deletions app/src/main/java/com/sanaa/novix/MainActivity.kt
Original file line number Diff line number Diff line change
Expand Up @@ -18,30 +18,9 @@ class MainActivity : ComponentActivity() {
super.onCreate(savedInstanceState)
enableEdgeToEdge()
setContent {
NovixTheme {
Scaffold(modifier = Modifier.fillMaxSize()) { innerPadding ->
Greeting(
name = "Android",
modifier = Modifier.padding(innerPadding)
)
}

}
}
}
}

@Composable
fun Greeting(name: String, modifier: Modifier = Modifier) {
Text(
text = "Hello $name!",
modifier = modifier
)
}
}

@Preview(showBackground = true)
@Composable
fun GreetingPreview() {
NovixTheme {
Greeting("Android")
}
}
81 changes: 81 additions & 0 deletions build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -6,4 +6,85 @@ plugins {
alias(libs.plugins.google.services) apply false
alias(libs.plugins.android.library) apply false
alias(libs.plugins.jetbrains.kotlin.jvm) apply false
alias(libs.plugins.kover)
Comment thread
Radwa85 marked this conversation as resolved.
}
val excludedPackages = listOf(
"*.R",
"*.R_*",
"*.BuildConfig*",
"*.Manifest*",
"com.sanaa.novix.ui.theme.*",
"*.ComposableSingletons*",
"*.MainActivity*"
)
allprojects {
apply(plugin = "org.jetbrains.kotlinx.kover")
kover {
reports {
filters {
excludes {
classes(
Comment thread
Radwa85 marked this conversation as resolved.
excludedPackages
)
}
}
total {
verify {
rule {
bound {
minValue = 80
}
}
}
}
}
}
}

dependencies {
kover(projects.app)
kover(projects.domain.authentication.repository)
kover(projects.domain.movies.repository)
kover(projects.domain.actors.repository)
kover(projects.domain.series)
kover(projects.domain.savedContent.repository)
kover(projects.domain.search.repository)
kover(projects.domain.userProfile.repository)
kover(projects.data.remoteDataSource.actors)
kover(projects.data.remoteDataSource.authentication)
kover(projects.data.remoteDataSource.movies)
kover(projects.data.remoteDataSource.savedContent)
kover(projects.data.remoteDataSource.search)
kover(projects.data.remoteDataSource.series)
kover(projects.data.remoteDataSource.userProfile)
kover(projects.data.localDataSource.actors)
kover(projects.data.localDataSource.authentication)
kover(projects.data.localDataSource.movies)
kover(projects.data.localDataSource.savedContent)
kover(projects.data.localDataSource.search)
kover(projects.data.localDataSource.series)
kover(projects.data.localDataSource.userProfile)
kover(projects.data.repositories.actors)
kover(projects.data.repositories.authentication)
kover(projects.data.repositories.movies)
kover(projects.data.repositories.savedContent)
kover(projects.data.repositories.search)
kover(projects.data.repositories.series)
kover(projects.data.repositories.userProfile)
kover(projects.feature.authentication.api)
kover(projects.feature.authentication.presentation)
kover(projects.feature.home.api)
kover(projects.feature.home.presentation)
kover(projects.feature.userProfile.api)
kover(projects.feature.userProfile.presentation)
kover(projects.feature.savedContent.api)
kover(projects.feature.savedContent.presentation)
kover(projects.feature.playlists.api)
kover(projects.feature.playlists.presentation)
kover(projects.feature.search.api)
kover(projects.feature.search.presentation)
kover(projects.feature.mediaDetails.api)
kover(projects.feature.mediaDetails.presentation)
kover(projects.feature.onboarding.api)
kover(projects.feature.onboarding.presentation)
}
4 changes: 4 additions & 0 deletions gradle/libs.versions.toml
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,8 @@ espressoCore = "3.6.1"
lifecycleRuntimeKtx = "2.9.1"
activityCompose = "1.10.1"
composeBom = "2025.06.01"
kover = "0.9.1"

appcompat = "1.7.1"
material = "1.12.0"
jetbrainsKotlinJvm = "2.0.21"
Expand Down Expand Up @@ -61,6 +63,8 @@ kotlin-android = { id = "org.jetbrains.kotlin.android", version.ref = "kotlin" }
kotlin-compose = { id = "org.jetbrains.kotlin.plugin.compose", version.ref = "kotlin" }
firebase-appdistribution = { id = "com.google.firebase.appdistribution", version = "5.1.1" }
google-services = { id = "com.google.gms.google-services", version = "4.4.3" }
kover = { id = "org.jetbrains.kotlinx.kover", version.ref = "kover" }

android-library = { id = "com.android.library", version.ref = "agp" }
jetbrains-kotlin-jvm = { id = "org.jetbrains.kotlin.jvm", version.ref = "jetbrainsKotlinJvm" }
kotlin-serialization = { id = "org.jetbrains.kotlin.plugin.serialization", version.ref = "kotlin" }
Expand Down
2 changes: 1 addition & 1 deletion settings.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ dependencyResolutionManagement {
mavenCentral()
}
}

enableFeaturePreview("TYPESAFE_PROJECT_ACCESSORS")
rootProject.name = "Novix"
include(":app")
include(":feature:authentication:presentation")
Expand Down