Skip to content

Commit

Permalink
ci: add build test
Browse files Browse the repository at this point in the history
  • Loading branch information
tassiluca committed Mar 4, 2024
1 parent e1b1f1c commit 1506f0a
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 6 deletions.
6 changes: 5 additions & 1 deletion .github/workflows/build-test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -37,10 +37,14 @@ jobs:
run: ./gradlew test
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Build
- name: Assemble classes and test classes
run: ./gradlew classes testClasses
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Build
run: ./gradlew build
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}

success:
needs: build
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,8 @@ interface Analyzer {

/**
* Performs a **suspending** analysis of the [organizationName]'s repositories, providing the results
* incrementally to the [updateResults] function, along with the indication of the completion.
* incrementally to the [updateResults] function.
* @return a successful [Result], containing the set of [RepositoryReport]s or a failure [Result] if the analysis.
*/
suspend fun analyze(
organizationName: String,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,15 +14,14 @@ import kotlinx.coroutines.launch
internal class GitHubAnalyzerByFlows(private val provider: GitHubRepositoryProvider) : Analyzer {

@OptIn(ExperimentalCoroutinesApi::class)
@Suppress("InjectDispatcher")
override suspend fun analyze(
organizationName: String,
updateResults: suspend (RepositoryReport) -> Unit,
): Result<Set<RepositoryReport>> = coroutineScope {
runCatching {
val reports = provider.flowingRepositoriesOf(organizationName)
.flatMapConcat { analyzeAll(it) }
.flowOn(Dispatchers.Default)
.flowOn(Dispatchers.IO)
var allReports = emptySet<RepositoryReport>()
reports.collect {
updateResults(it)
Expand Down
2 changes: 0 additions & 2 deletions build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@ plugins {
alias(libs.plugins.scalatest)
alias(libs.plugins.kotlin.jvm)
alias(libs.plugins.dokka)
alias(libs.plugins.kotlin.qa)
}

val projectRepository = projectDir.resolve("libs")
Expand All @@ -17,7 +16,6 @@ allprojects {
apply(plugin = "scala")
apply(plugin = kotlin.jvm.get().pluginId)
apply(plugin = dokka.get().pluginId)
apply(plugin = kotlin.qa.get().pluginId)
}

if (!this.name.contains("kt")) {
Expand Down

0 comments on commit 1506f0a

Please sign in to comment.