Skip to content

Commit

Permalink
#3 enable tests in github CI for the plugin
Browse files Browse the repository at this point in the history
  • Loading branch information
simonhauck committed May 3, 2024
1 parent 1bedb3c commit 9327d9c
Show file tree
Hide file tree
Showing 6 changed files with 30 additions and 9 deletions.
6 changes: 3 additions & 3 deletions .github/workflows/run-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -33,8 +33,8 @@ jobs:
./**/build
./**/node_modules
- name: Run assemble
run: ./gradlew assemble
- name: Run Assemble
run: ./gradlew plugin:assemble assemble

- name: Run check
run: ./gradlew check
run: ./gradlew plugin:check check
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,6 @@ addresses some of the shortcomings and provides additional functionalities.

### Important commands and development setup

- To format the code run `./gradlew format`
- To build the project use `./gradlew assemble`
- To run all checks use `./gradlew check`
- To format the code run `./gradlew format` and `./gradlew plugin:format` for the plugin
- To build the project use `./gradlew assemble` and `gradlew plugin:assemble` for the plugin
- To run all checks use `./gradlew check` and `./gradlew plugin:check` for the plugin
2 changes: 1 addition & 1 deletion build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import java.util.*
plugins { id("build.common.kotlin-conventions") apply false }

allprojects {
group = "com.github.cryptojuenger.template"
group = "com.github.simonhauck.semantic-versioning"
version = readVersionFromFile(file("${rootProject.projectDir.resolve("version.properties")}"))
}

Expand Down
21 changes: 21 additions & 0 deletions plugin/build.gradle.kts
Original file line number Diff line number Diff line change
@@ -1,2 +1,23 @@
// ---------------------------------------------------------------------------------------------------------------------
// Register delegate tasks
// ---------------------------------------------------------------------------------------------------------------------

listOf(
"build",
"clean",
"assemble",
"check",
"format",
"checkFormat",
"test",
)
.forEach { taskName ->
tasks.register(taskName) {
group = tasks.first().group
dependsOn(tasksWithNameInSubmodules(taskName))
}
}

fun tasksWithNameInSubmodules(taskName: String): List<Task> {
return subprojects.mapNotNull { it.tasks.findByName(taskName) }
}
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
package com.github.simonhauck.git.process

import java.util.concurrent.TimeUnit
import org.gradle.nativeplatform.platform.internal.DefaultNativePlatform
import org.zeroturnaround.exec.ProcessExecutor
import org.zeroturnaround.exec.stream.LogOutputStream
import java.util.concurrent.TimeUnit

internal class ProcessWrapper {

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,11 @@ package com.github.simonhauck.git

import com.github.simonhauck.git.process.ProcessConfig
import com.github.simonhauck.git.process.ProcessResult
import java.io.File
import org.assertj.core.api.Assertions.assertThat
import org.junit.jupiter.api.BeforeEach
import org.junit.jupiter.api.Test
import org.junit.jupiter.api.io.TempDir
import java.io.File

class GitCommandWrapperTest {

Expand Down

0 comments on commit 9327d9c

Please sign in to comment.