Skip to content

Commit

Permalink
add github CI build action 5
Browse files Browse the repository at this point in the history
  • Loading branch information
pull-vert committed Sep 25, 2024
1 parent 2eb8d8b commit ea4f237
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 4 deletions.
5 changes: 3 additions & 2 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ jobs:
matrix:
os: [ 'macos-latest', 'ubuntu-latest', 'windows-latest' ]
distribution: [ 'oracle', 'temurin', 'zulu' ]
java: [ '21', '22' ] # replace '22' with '23' when Kotlin supports it
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v4
Expand All @@ -16,10 +17,10 @@ jobs:
uses: actions/setup-java@v4
with:
distribution: ${{ matrix.distribution }}
java-version: 21
java-version: ${{ matrix.java }}

- name: Setup Gradle
uses: gradle/actions/setup-gradle@v4

- name: Execute Gradle build, including slow tests
run: ./gradlew build -PincludeSlowTests
run: ./gradlew build -PisCI
6 changes: 4 additions & 2 deletions core/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,10 @@ dependencies {
tasks {
withType<Test> {
useJUnitPlatform {
val includeSlowTests = providers.gradleProperty("includeSlowTests")
if (!includeSlowTests.isPresent) {
val isCI = providers.gradleProperty("isCI")
if (isCI.isPresent) {
excludeTags("no-ci")
} else {
excludeTags("slow")
}
// override security properties enabling all options
Expand Down
2 changes: 2 additions & 0 deletions core/src/test/kotlin/jayo/internal/AwaitMonitorTest.kt
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ import jayo.exceptions.JayoTimeoutException
import jayo.external.CancelToken
import jayo.internal.TestUtil.assumeNotWindows
import org.assertj.core.api.Assertions.*
import org.junit.jupiter.api.Tag
import org.junit.jupiter.api.Test
import org.junit.jupiter.params.ParameterizedTest
import org.junit.jupiter.params.provider.Arguments
Expand All @@ -35,6 +36,7 @@ import java.util.concurrent.TimeUnit
import java.util.stream.Stream
import kotlin.time.Duration.Companion.milliseconds

@Tag("no-ci")
class AwaitMonitorTest {

val monitor = Object()
Expand Down
2 changes: 2 additions & 0 deletions core/src/test/kotlin/jayo/internal/AwaitSignalTest.kt
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ import jayo.exceptions.JayoTimeoutException
import jayo.external.CancelToken
import jayo.internal.TestUtil.assumeNotWindows
import org.assertj.core.api.Assertions.*
import org.junit.jupiter.api.Tag
import org.junit.jupiter.api.Test
import org.junit.jupiter.params.ParameterizedTest
import org.junit.jupiter.params.provider.Arguments
Expand All @@ -38,6 +39,7 @@ import java.util.stream.Stream
import kotlin.concurrent.withLock
import kotlin.time.Duration.Companion.milliseconds

@Tag("no-ci")
class AwaitSignalTest {
private val lock: ReentrantLock = ReentrantLock()
private val condition: Condition = lock.newCondition()
Expand Down

0 comments on commit ea4f237

Please sign in to comment.