diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index da9f91f..46dcc18 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -49,37 +49,9 @@ jobs: # Mirrors `mise run check`; invoked directly so the CI job only needs the JVM # toolchain instead of the full local tool set from mise.toml. - - name: Run validation (format, coverage, tests) - run: sbt "scalafmtCheckAll; clean; coverage; test; coverageReport" + - name: Run validation (format, tests) + run: sbt "scalafmtCheckAll; clean; test" env: # Resolves lv.id.jc:dicechess-engine-scala from GitHub Packages GITHUB_ACTOR: ${{ github.actor }} GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - - - name: Locate Scoverage report - # The report path embeds the Scala version (target/out/jvm/scala-/...), so a - # hardcoded path in sonar-project.properties silently goes stale on every - # scalaVersion bump (the Scoverage sensor only WARNs, never fails, on a - # missing report — see dicechess-engine-scala#448 for how this bit that repo). - # Discover the real path at scan time and fail loudly if it's missing, instead - # of letting SonarCloud quietly show zero coverage. - if: ${{ env.SONAR_TOKEN != '' && github.actor != 'dependabot[bot]' }} - id: scoverage - run: | - REPORT=$(find target -maxdepth 10 -path '*/scoverage-report/scoverage.xml' -print -quit) - if [ -z "$REPORT" ]; then - echo "::error::No scoverage.xml found under target/ — SonarQube coverage import would silently fail." - exit 1 - fi - echo "Found Scoverage report at $REPORT" - echo "report_path=$REPORT" >> "$GITHUB_OUTPUT" - - # Imports the scoverage report (see sonar-project.properties) into SonarCloud. - # Requires Automatic Analysis to be OFF for this project (CI-based analysis instead). - - name: SonarQube Scan - if: ${{ env.SONAR_TOKEN != '' && github.actor != 'dependabot[bot]' }} - uses: SonarSource/sonarqube-scan-action@713881670b6b3676cda39549040e2d88c70d582e # v8.2.0 - env: - SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }} - with: - args: -Dsonar.scala.coverage.reportPaths=${{ steps.scoverage.outputs.report_path }} diff --git a/build.sbt b/build.sbt index d1f5ee0..22b65dd 100644 --- a/build.sbt +++ b/build.sbt @@ -54,7 +54,5 @@ lazy val root = (project in file(".")) "org.typelevel" %% "munit-cats-effect" % MunitCatsEffectVersion % Test ), scalacOptions ++= Seq("-Werror", "-Wunused:all", "-deprecation", "-feature", "-explain"), - coverageExcludedFiles := ".*Main\\.scala", - coverageFailOnMinimum := false, - Test / fork := true + Test / fork := true ) diff --git a/project/plugins.sbt b/project/plugins.sbt index e7ee5b6..c893fc6 100644 --- a/project/plugins.sbt +++ b/project/plugins.sbt @@ -1,3 +1,3 @@ addSbtPlugin("org.scalameta" % "sbt-scalafmt" % "2.6.1") -addSbtPlugin("org.scoverage" % "sbt-scoverage" % "2.4.4") +// addSbtPlugin("org.scoverage" % "sbt-scoverage" % "2.4.4") addSbtPlugin("com.github.sbt" % "sbt-native-packager" % "1.11.7")