Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
58 changes: 38 additions & 20 deletions .github/workflows/main-pr-checks.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,26 +12,44 @@ on:
- "*/README.md"

jobs:
build:
name: "Setup and Build Project"
runs-on: [ubuntu-22.04]
if: github.event.pull_request.draft == false # ignore draft pull requests
# env:
#
# outputs:
#
build-app-android:
if: github.event.pull_request.draft == false
runs-on: ubuntu-22.04
steps:
- name: "Checkout Project"
uses: actions/checkout@v4
- name: "Setup Java 17"
uses: actions/setup-java@v4
- name: Setup
uses: Pointyware/.github/.github/actions/checkout-java-gradle@b70bbae19637171d6cf9311f06a59f1c15e2598b
- name: Run Debug Unit Tests
run: ./gradlew :app-android:koverHtmlReportDebug -Pgithub.user=${{ secrets.BUILD_USER }} -Pgithub.token=${{ secrets.BUILD_TOKEN }}
- name: Upload Debug Unit Test Coverage
if: success()
uses: actions/upload-artifact@v4
with:
distribution: 'temurin' # See 'Supported distributions' for available options
java-version: '17'
- name: "Setup Gradle"
uses: gradle/actions/setup-gradle@v3

- name: "Build: Assemble and Test entire project"
run: ./gradlew jvmTest
path: "app-android/build/reports/kover/htmlDebug/*"
name: android-debug-test-coverage
- name: Upload Debug Unit Test Reports
if: failure()
uses: actions/upload-artifact@v4
with:
path: "**/build/reports/tests/testDebugUnitTest/*"
name: android-debug-test-reports

# - run: ./gradlew generate coverage report, upload test/coverage reports
build-app-desktop:
if: github.event.pull_request.draft == false
runs-on: ubuntu-22.04
steps:
- name: Setup
uses: Pointyware/.github/.github/actions/checkout-java-gradle@b70bbae19637171d6cf9311f06a59f1c15e2598b
- name: Build Desktop App
run: ./gradlew :app-desktop:koverHtmlReport -Pgithub.user=${{ secrets.BUILD_USER }} -Pgithub.token=${{ secrets.BUILD_TOKEN }}
- name: Upload Desktop Test Coverage
if: success()
uses: actions/upload-artifact@v4
with:
path: "app-desktop/build/reports/kover/html/*"
name: jvm-test-coverage
- name: Upload Jvm Test Reports
if: failure()
uses: actions/upload-artifact@v4
with:
path: "**/build/reports/tests/jvmTest/*"
name: jvm-test-reports
2 changes: 0 additions & 2 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@ on:

jobs:
build-app-android:
if: github.event.pull_request.draft == false
runs-on: ubuntu-22.04
steps:
- name: Setup
Expand All @@ -23,7 +22,6 @@ jobs:
name: app-android-release.aab

build-app-desktop:
if: github.event.pull_request.draft == false
runs-on: ubuntu-22.04
steps:
- name: Setup
Expand Down
16 changes: 16 additions & 0 deletions app-android/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ plugins {
alias(libs.plugins.androidApplication)
alias(libs.plugins.composeMultiplatform)
alias(libs.plugins.compose.compiler)
alias(libs.plugins.kover)
}

android {
Expand Down Expand Up @@ -40,6 +41,21 @@ dependencies {

implementation(projects.appShared)

kover(projects.core.common)
kover(projects.core.data)
kover(projects.core.entities)
kover(projects.core.interactors)
kover(projects.core.local)
kover(projects.core.navigation)
kover(projects.core.remote)
kover(projects.core.ui)
kover(projects.core.viewModels)

kover(projects.feature.epistemology)
kover(projects.feature.ontology)

kover(projects.appShared)

implementation(libs.androidx.activityCompose)
implementation(libs.androidx.composeMaterial3)
debugImplementation(libs.androidx.composeTooling)
Expand Down
16 changes: 16 additions & 0 deletions app-desktop/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ plugins {
alias(libs.plugins.kotlinJvm)
alias(libs.plugins.composeMultiplatform)
alias(libs.plugins.compose.compiler)
alias(libs.plugins.kover)
}

kotlin {
Expand Down Expand Up @@ -29,6 +30,21 @@ dependencies {

implementation(projects.appShared)

kover(projects.core.common)
kover(projects.core.data)
kover(projects.core.entities)
kover(projects.core.interactors)
kover(projects.core.local)
kover(projects.core.navigation)
kover(projects.core.remote)
kover(projects.core.ui)
kover(projects.core.viewModels)

kover(projects.feature.epistemology)
kover(projects.feature.ontology)

kover(projects.appShared)

implementation(libs.kotlinx.dateTime)
implementation(libs.koin.core)

Expand Down
1 change: 1 addition & 0 deletions app-shared/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ plugins {
alias(libs.plugins.compose.compiler)
alias(libs.plugins.commonsense.koin)
alias(libs.plugins.commonsense.kmp)
alias(libs.plugins.kover)
}

kotlin {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,9 +1,12 @@
package di
/*
* Copyright (c) 2024 Pointyware. Use of this software is governed by the GPL-3.0 license.
*/

package org.pointyware.commonsense.shared.di

import org.koin.core.KoinApplication
import org.koin.test.check.checkModules
import org.pointyware.commonsense.feature.ontology.di.ontologyJvmSharedModule
import org.pointyware.commonsense.shared.di.setupKoin
import kotlin.test.AfterTest
import kotlin.test.BeforeTest
import kotlin.test.Test
Expand Down
2 changes: 1 addition & 1 deletion build.gradle.kts
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
import org.jetbrains.dokka.gradle.DokkaMultiModuleTask
import org.jetbrains.dokka.gradle.DokkaTask
import java.net.URL

Expand All @@ -19,6 +18,7 @@ plugins {

alias(libs.plugins.commonsense.koin).apply(false)
alias(libs.plugins.commonsense.kmp).apply(false)
alias(libs.plugins.kover).apply(false)
}

tasks.dokkaHtmlMultiModule {
Expand Down
1 change: 1 addition & 0 deletions core/common/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ plugins {
alias(libs.plugins.kotlinMultiplatform)
alias(libs.plugins.kotlinSerialization)
alias(libs.plugins.androidLibrary)
alias(libs.plugins.kover)
}

kotlin {
Expand Down
1 change: 1 addition & 0 deletions core/data/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ plugins {
alias(libs.plugins.kotlinMultiplatform)
alias(libs.plugins.kotlinSerialization)
alias(libs.plugins.androidLibrary)
alias(libs.plugins.kover)
}

kotlin {
Expand Down
1 change: 1 addition & 0 deletions core/entities/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ import org.jetbrains.kotlin.gradle.plugin.mpp.apple.XCFramework
plugins {
alias(libs.plugins.kotlinMultiplatform)
alias(libs.plugins.androidLibrary)
alias(libs.plugins.kover)
}

kotlin {
Expand Down
1 change: 1 addition & 0 deletions core/interactors/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ import org.jetbrains.kotlin.gradle.plugin.mpp.apple.XCFramework
plugins {
alias(libs.plugins.kotlinMultiplatform)
alias(libs.plugins.androidLibrary)
alias(libs.plugins.kover)
}

kotlin {
Expand Down
1 change: 1 addition & 0 deletions core/local/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ plugins {
alias(libs.plugins.kotlinMultiplatform)
alias(libs.plugins.androidLibrary)
alias(libs.plugins.kotlinSerialization)
alias(libs.plugins.kover)
}

kotlin {
Expand Down
1 change: 1 addition & 0 deletions core/navigation/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ plugins {
alias(libs.plugins.androidLibrary)
alias(libs.plugins.composeMultiplatform)
alias(libs.plugins.compose.compiler)
alias(libs.plugins.kover)
}

kotlin {
Expand Down
1 change: 1 addition & 0 deletions core/remote/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ import org.jetbrains.kotlin.gradle.plugin.mpp.apple.XCFramework
plugins {
alias(libs.plugins.kotlinMultiplatform)
alias(libs.plugins.androidLibrary)
alias(libs.plugins.kover)
}

kotlin {
Expand Down
1 change: 1 addition & 0 deletions core/ui/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ plugins {
alias(libs.plugins.androidLibrary)
alias(libs.plugins.composeMultiplatform)
alias(libs.plugins.compose.compiler)
alias(libs.plugins.kover)
}

kotlin {
Expand Down
1 change: 1 addition & 0 deletions core/view-models/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ import org.jetbrains.kotlin.gradle.plugin.mpp.apple.XCFramework
plugins {
alias(libs.plugins.kotlinMultiplatform)
alias(libs.plugins.androidLibrary)
alias(libs.plugins.kover)
}

kotlin {
Expand Down
1 change: 1 addition & 0 deletions feature/epistemology/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ plugins {
alias(libs.plugins.composeMultiplatform)
alias(libs.plugins.compose.compiler)
alias(libs.plugins.ksp)
alias(libs.plugins.kover)
}

kotlin {
Expand Down
1 change: 1 addition & 0 deletions feature/ontology/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ plugins {
alias(libs.plugins.ksp)
alias(libs.plugins.sqlDelight)
alias(libs.plugins.realm)
alias(libs.plugins.kover)
}

kotlin {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@

package org.pointyware.commonsense.feature.ontology.data

import kotlinx.coroutines.runBlocking
import kotlinx.coroutines.test.runTest
import org.koin.core.context.startKoin
import org.koin.core.context.stopKoin
Expand All @@ -19,8 +18,6 @@ import kotlin.test.DefaultAsserter.assertEquals
import kotlin.test.DefaultAsserter.assertNotEquals
import kotlin.test.DefaultAsserter.assertTrue
import kotlin.test.Test
import kotlin.test.assertFailsWith
import kotlin.test.fail
import kotlin.uuid.ExperimentalUuidApi
import kotlin.uuid.Uuid

Expand Down
2 changes: 2 additions & 0 deletions gradle/libs.versions.toml
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ kotlinx-coroutines = "1.8.1"
kotlinx-datetime = "0.6.0"
kotlinx-io = "0.5.4"
kotlinx-serialization = "1.7.3"
kover = "0.9.0-RC"
ksp = "2.0.20-1.0.25"
ktor = "2.3.12"
material3 = "1.3.0"
Expand Down Expand Up @@ -74,6 +75,7 @@ kotlinAndroid = { id = "org.jetbrains.kotlin.android", version.ref = "kotl
kotlinJvm = { id = "org.jetbrains.kotlin.jvm", version.ref = "kotlin" }
kotlinMultiplatform = { id = "org.jetbrains.kotlin.multiplatform", version.ref = "kotlin" }
kotlinSerialization = { id = "org.jetbrains.kotlin.plugin.serialization", version.ref = "kotlin" }
kover = { id = "org.jetbrains.kotlinx.kover", version.ref = "kover" }
ksp = { id = "com.google.devtools.ksp", version.ref = "ksp" }
ktor = { id = "io.ktor.plugin", version.ref = "ktor" }
realm = { id = "io.realm.kotlin", version.ref = "realm" }
Expand Down