From b623f5723b3096335c6526dedb79741852ee0d3a Mon Sep 17 00:00:00 2001 From: Christopher Bartz Date: Thu, 1 Oct 2026 11:02:05 +0000 Subject: [PATCH] fix(tics): export DOTNET_ROOT before running dotnet-coverage --- .github/workflows/tics.yaml | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) diff --git a/.github/workflows/tics.yaml b/.github/workflows/tics.yaml index 026656611a6..38f60849c70 100644 --- a/.github/workflows/tics.yaml +++ b/.github/workflows/tics.yaml @@ -23,19 +23,22 @@ jobs: working-directory: src run: ./dev.sh layout Release linux-x64 + # dev.sh installs its own SDK under _dotnetsdk/; dotnet-coverage and TICS + # need DOTNET_ROOT to find it. + - name: Locate .NET SDK + run: | + DOTNET_DIR="$(dirname "$(ls "${GITHUB_WORKSPACE}"/_dotnetsdk/*/dotnet | head -n1)")" + echo "DOTNET_ROOT=${DOTNET_DIR}" >> "$GITHUB_ENV" + echo "${DOTNET_DIR}" >> "$GITHUB_PATH" + echo "${HOME}/.dotnet/tools" >> "$GITHUB_PATH" + - name: Run L0 tests with coverage working-directory: src run: | - # dev.sh installs its own SDK under _dotnetsdk/ - DOTNET_DIR="$(dirname "$(ls "${GITHUB_WORKSPACE}"/_dotnetsdk/*/dotnet | head -n1)")" - export PATH="${DOTNET_DIR}:${HOME}/.dotnet/tools:${PATH}" dotnet tool update --global dotnet-coverage dotnet-coverage collect --output-format cobertura \ --output "${GITHUB_WORKSPACE}/.coverage/cobertura.xml" "./dev.sh test" - - name: Locate .NET SDK - run: echo "DOTNET_ROOT=$(dirname "$(ls "${GITHUB_WORKSPACE}"/_dotnetsdk/*/dotnet | head -n1)")" >> "$GITHUB_ENV" - - name: TICS GitHub Action uses: tiobe/tics-github-action@v3 with: