Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
19 commits
Select commit Hold shift + click to select a range
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
37 changes: 29 additions & 8 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,11 +13,26 @@ concurrency:
cancel-in-progress: ${{ github.ref != 'refs/heads/main' }}

jobs:
validate-pr:
runs-on: macos-latest-xlarge
name: Validate PR
build:
runs-on: ${{ matrix.os }}
name: ${{ matrix.name }}
strategy:
fail-fast: false
matrix:
include:
- os: macos-latest-xlarge
name: "macOS"
java-opts: "-Xmx8g -Dfile.encoding=UTF-8 -Djava.awt.headless=true -Dkotlin.daemon.jvm.options=-Xmx6g -DexcludeDockerTests=true"
gradle-task: "clean ktlintCheck assemble macosArm64Test macosX64Test jvmTest koverLog koverHtmlReport"
test-type: "macos"
- os: ubuntu-latest
name: "Ubuntu"
java-opts: "-Xmx4g -Dfile.encoding=UTF-8 -Djava.awt.headless=true -Dkotlin.daemon.jvm.options=-Xmx3g"
gradle-task: "clean :kotlin-sdk-test:jvmTest"
test-type: "ubuntu"
env:
JAVA_OPTS: "-Xmx8g -Dfile.encoding=UTF-8 -Djava.awt.headless=true -Dkotlin.daemon.jvm.options=-Xmx6g"
JAVA_OPTS: "${{ matrix.java-opts }}"
TS_SDK_IMAGE: "registry.jetbrains.team/p/grazi/grazie-infra-public/typescript-sdk-mcp@sha256:69f7762ec271b768b10e2d383e1dbc135c4df38a314a75c1ef35e9ff42276cb4"
steps:
- uses: actions/checkout@v5

Expand All @@ -34,27 +49,32 @@ jobs:
cache-read-only: true

- name: Build with Gradle
run: |-
./gradlew clean ktlintCheck build koverLog koverHtmlReport
./gradlew :kotlin-sdk-core:publishToMavenLocal :kotlin-sdk-client:publishToMavenLocal :kotlin-sdk-server:publishToMavenLocal
run: ./gradlew ${{ matrix.gradle-task }}

- name: Publish to Maven Local (macOS only)
if: matrix.test-type == 'macos'
run: ./gradlew :kotlin-sdk-core:publishToMavenLocal :kotlin-sdk-client:publishToMavenLocal :kotlin-sdk-server:publishToMavenLocal

- name: Build Kotlin-MCP-Client Sample
if: matrix.test-type == 'macos'
working-directory: ./samples/kotlin-mcp-client
run: ./../../gradlew clean build

- name: Build Kotlin-MCP-Server Sample
if: matrix.test-type == 'macos'
working-directory: ./samples/kotlin-mcp-server
run: ./../../gradlew clean build

- name: Build Weather-Stdio-Server Sample
if: matrix.test-type == 'macos'
working-directory: ./samples/weather-stdio-server
run: ./../../gradlew clean build

- name: Upload Reports
if: ${{ !cancelled() }}
uses: actions/upload-artifact@v4
with:
name: reports
name: reports-${{ matrix.test-type }}
path: |
**/build/reports/

Expand All @@ -68,6 +88,7 @@ jobs:
include_empty_in_summary: false
include_time_in_summary: true
annotate_only: true
check_name: Test Report (${{ matrix.test-type }})

- name: Disable Auto-Merge on Fail
if: failure() && github.event_name == 'pull_request'
Expand Down
2 changes: 2 additions & 0 deletions gradle/libs.versions.toml
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ logging = "7.0.13"
slf4j = "2.0.17"
kotest = "6.0.3"
awaitility = "4.3.0"
testcontainers = "1.21.3"

# Samples
mcp-kotlin = "0.7.2"
Expand Down Expand Up @@ -54,6 +55,7 @@ kotlinx-coroutines-test = { group = "org.jetbrains.kotlinx", name = "kotlinx-cor
ktor-client-mock = { group = "io.ktor", name = "ktor-client-mock", version.ref = "ktor" }
ktor-server-test-host = { group = "io.ktor", name = "ktor-server-test-host", version.ref = "ktor" }
slf4j-simple = { group = "org.slf4j", name = "slf4j-simple", version.ref = "slf4j" }
testcontainers = { group = "org.testcontainers", name = "testcontainers", version.ref = "testcontainers" }

# Samples
ktor-client-cio = { group = "io.ktor", name = "ktor-client-cio", version.ref = "ktor" }
Expand Down
6 changes: 6 additions & 0 deletions kotlin-sdk-test/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,11 @@ kotlin {
jvm {
testRuns["test"].executionTask.configure {
useJUnitPlatform()
if (System.getProperty("excludeDockerTests") == "true") {
filter {
excludeTestsMatching("*.typescript.*")
}
}
}
}
sourceSets {
Expand All @@ -25,6 +30,7 @@ kotlin {
dependencies {
implementation(kotlin("test-junit5"))
implementation(libs.awaitility)
implementation(libs.testcontainers)
runtimeOnly(libs.slf4j.simple)
}
}
Expand Down
Loading