diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index e2d28699..f4642604 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -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 @@ -34,19 +49,24 @@ 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 @@ -54,7 +74,7 @@ jobs: if: ${{ !cancelled() }} uses: actions/upload-artifact@v4 with: - name: reports + name: reports-${{ matrix.test-type }} path: | **/build/reports/ @@ -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' diff --git a/kotlin-sdk-test/build.gradle.kts b/kotlin-sdk-test/build.gradle.kts index 012619b9..cf92ae39 100644 --- a/kotlin-sdk-test/build.gradle.kts +++ b/kotlin-sdk-test/build.gradle.kts @@ -6,6 +6,11 @@ kotlin { jvm { testRuns["test"].executionTask.configure { useJUnitPlatform() + if (System.getProperty("excludeDockerTests") == "true") { + filter { + excludeTestsMatching("*.typescript.*") + } + } } } sourceSets {