From ac1bbd76359202d5dbedfecbce684a6bfdf5cb48 Mon Sep 17 00:00:00 2001 From: Leonid Pershin Date: Fri, 17 Oct 2025 06:51:46 +0300 Subject: [PATCH] fx --- .gitea/workflows/build.yml | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/.gitea/workflows/build.yml b/.gitea/workflows/build.yml index f4b0d7f..05a3ec7 100644 --- a/.gitea/workflows/build.yml +++ b/.gitea/workflows/build.yml @@ -9,6 +9,8 @@ jobs: build: name: Build and analyze runs-on: ubuntu-latest + env: + PATH: ${{ env.PATH }}:/root/.dotnet/tools steps: - name: Set up JDK 17 uses: actions/setup-java@v4 @@ -29,8 +31,12 @@ jobs: - name: Install coverlet.collector run: | dotnet tool install --global coverlet.console + echo "Adding .dotnet/tools to PATH..." + echo 'export PATH="$PATH:/root/.dotnet/tools"' >> ~/.bashrc + export PATH="$PATH:/root/.dotnet/tools" echo "Coverlet installed at:" - which coverlet + which coverlet || echo "Coverlet not found, trying full path..." + ls -la /root/.dotnet/tools/ | grep coverlet || echo "No coverlet in tools directory" - name: Restore dependencies run: dotnet restore --verbosity normal - name: SonarQube begin @@ -58,6 +64,8 @@ jobs: echo "Trying to run coverlet..." if coverlet ./ChatBot.Tests/bin/Debug/net9.0/ChatBot.Tests.dll --target "dotnet" --targetargs "test --no-build" -f=opencover -o="coverage.xml"; then echo "Coverlet succeeded" + elif /root/.dotnet/tools/coverlet ./ChatBot.Tests/bin/Debug/net9.0/ChatBot.Tests.dll --target "dotnet" --targetargs "test --no-build" -f=opencover -o="coverage.xml"; then + echo "Coverlet succeeded with full path" else echo "Coverlet failed, trying built-in coverage collection..." dotnet test --collect:"XPlat Code Coverage" --results-directory ./TestResults