Skip to content
Open
Changes from all commits
Commits
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
34 changes: 17 additions & 17 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -56,23 +56,23 @@ jobs:
GITHUB_ACTOR: ${{ github.actor }}
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

- name: Locate Scoverage report
# The report path embeds the Scala version (target/out/jvm/scala-<ver>/...), 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"
- name: Locate Scoverage report
# The report path embeds the Scala version (target/out/jvm/scala-<ver>/...), 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).
Expand Down
Loading