From d6e4e7d9351aa11a7cc8827871adebe2c0551488 Mon Sep 17 00:00:00 2001 From: wrongwrong Date: Sun, 25 Oct 2026 02:46:56 +0900 Subject: [PATCH 1/2] =?UTF-8?q?ci:=20=E3=83=9E=E3=82=A4=E3=83=8A=E3=83=BC?= =?UTF-8?q?=E6=A8=AA=E6=96=AD=E3=83=93=E3=83=AB=E3=83=89=E3=81=AE=E9=87=8D?= =?UTF-8?q?=E3=81=84=E3=83=86=E3=82=B9=E3=83=88=E3=82=92=E4=BA=92=E3=81=84?= =?UTF-8?q?=E3=81=AB=E7=8B=AC=E7=AB=8B=E3=81=95=E3=81=9B=E3=82=8B?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 週 1 回しか回らない検出ビルドで先に落ちた 1 件がジョブを止めると、残りの検出が隠れて 1 回の実行から 1 件しか分からない。実際に 2.5.0-Beta1 / Beta2 の 2 回は :gradle-integration:test の失敗で停止し、:maven-integration:test は 2.5 系で 一度も走っていない(最後の完走は 2.4.20-RC3)。 2 つのテストは互いに依存しないため両方を走らせ、最後にまとめて判定する。 ci.yml は両者を別ジョブに分けており、判定の単位はそちらと揃う。 Changelog: none Co-Authored-By: Claude Opus 5 --- .github/workflows/kotlin-prerelease.yml | 23 ++++++++++++++++++++--- 1 file changed, 20 insertions(+), 3 deletions(-) diff --git a/.github/workflows/kotlin-prerelease.yml b/.github/workflows/kotlin-prerelease.yml index d438c63..dab0de8 100644 --- a/.github/workflows/kotlin-prerelease.yml +++ b/.github/workflows/kotlin-prerelease.yml @@ -102,6 +102,23 @@ jobs: ./gradlew -p integration-test build $KOTLIN_OVERRIDE -x :gradle-integration:test -x :maven-integration:test # 重いテストはローカル Maven の非タイムスタンプ SNAPSHOT を入力に持ち UP-TO-DATE 判定が - # 信用できないため --rerun で必ず再実行する(ci.yml と同じ理由) - - run: ./gradlew -p integration-test :gradle-integration:test --rerun $KOTLIN_OVERRIDE - - run: ./gradlew -p integration-test :maven-integration:test --rerun $KOTLIN_OVERRIDE + # 信用できないため --rerun で必ず再実行する(ci.yml と同じ理由)。 + # 本ビルドは必須チェックではなく検出が目的であり、週 1 回しか回らない。先に落ちた 1 件で + # ジョブが止まると残りの検出が隠れ、1 回の実行で 1 件しか分からなくなる。2 つのテストは + # 互いに依存しないため、両方を走らせてから最後にまとめて判定する + - id: gradle_it + continue-on-error: true + run: ./gradlew -p integration-test :gradle-integration:test --rerun $KOTLIN_OVERRIDE + - id: maven_it + continue-on-error: true + run: ./gradlew -p integration-test :maven-integration:test --rerun $KOTLIN_OVERRIDE + - env: + GRADLE_IT: ${{ steps.gradle_it.outcome }} + MAVEN_IT: ${{ steps.maven_it.outcome }} + run: | + set -euo pipefail + echo "gradle-integration: $GRADLE_IT" + echo "maven-integration: $MAVEN_IT" + if [ "$GRADLE_IT" != success ] || [ "$MAVEN_IT" != success ]; then + exit 1 + fi From 83fbe6fc01f57b204cca6de0b833885f44e20fdc Mon Sep 17 00:00:00 2001 From: wrongwrong Date: Sun, 25 Oct 2026 02:47:05 +0900 Subject: [PATCH 2/2] =?UTF-8?q?build:=20=E7=B5=90=E5=90=88=E3=83=86?= =?UTF-8?q?=E3=82=B9=E3=83=88=E3=81=AE=E5=A4=B1=E6=95=97=E7=90=86=E7=94=B1?= =?UTF-8?q?=E3=82=92=E3=83=AD=E3=82=B0=E3=81=B8=E6=AE=8B=E3=81=99?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit testLogging の exceptionFormat は既定が SHORT で、例外の型と位置だけを出して メッセージを落とす。診断アサーションは期待した断片と実際の診断行一覧を メッセージへ組み立てており、これが出ないと CI の失敗からは 「どのアサーションが落ちたか」しか分からず、原因の切り分けにローカル再現が要る。 CI の失敗はログだけが手掛かりであるため全文を出す。 Changelog: none Co-Authored-By: Claude Opus 5 --- integration-test/gradle-integration/build.gradle.kts | 4 ++++ integration-test/maven-integration/build.gradle.kts | 4 ++++ 2 files changed, 8 insertions(+) diff --git a/integration-test/gradle-integration/build.gradle.kts b/integration-test/gradle-integration/build.gradle.kts index 1c9ccba..4bf3b7c 100644 --- a/integration-test/gradle-integration/build.gradle.kts +++ b/integration-test/gradle-integration/build.gradle.kts @@ -2,6 +2,7 @@ import com.sun.management.OperatingSystemMXBean import java.io.File import java.lang.management.ManagementFactory import java.util.Properties +import org.gradle.api.tasks.testing.logging.TestExceptionFormat // Gradle TestKit ホスト(docs/test/テスト戦略.md §4)。 // resources/fixtures 配下の合成ビルドを GradleRunner で駆動し、IC 回帰・決定性・ @@ -138,5 +139,8 @@ tasks.test { testLogging { events("passed", "skipped", "failed") showStandardStreams = false + // 既定の SHORT は例外の位置だけを出すため、アサーションが組み立てた診断一覧が落ちて + // 失敗の理由がログから読めない。CI の失敗はログだけが手掛かりなので全文を出す + exceptionFormat = TestExceptionFormat.FULL } } diff --git a/integration-test/maven-integration/build.gradle.kts b/integration-test/maven-integration/build.gradle.kts index f39ade7..4b645e0 100644 --- a/integration-test/maven-integration/build.gradle.kts +++ b/integration-test/maven-integration/build.gradle.kts @@ -1,4 +1,5 @@ import java.util.Properties +import org.gradle.api.tasks.testing.logging.TestExceptionFormat // Maven ビルドホスト(docs/test/テスト戦略.md §4)。 // resources/fixtures 配下の合成 Maven プロジェクトを実 Maven で駆動し、kotlin-maven-plugin の拡張 @@ -83,5 +84,8 @@ tasks.test { testLogging { events("passed", "skipped", "failed") showStandardStreams = false + // 既定の SHORT は例外の位置だけを出すため、アサーションが組み立てた Maven 出力の抜粋が + // 落ちて失敗の理由がログから読めない。CI の失敗はログだけが手掛かりなので全文を出す + exceptionFormat = TestExceptionFormat.FULL } }