diff --git a/.gitea/workflows/build.yml b/.gitea/workflows/build.yml index 314cd62..3fe63cb 100644 --- a/.gitea/workflows/build.yml +++ b/.gitea/workflows/build.yml @@ -22,30 +22,23 @@ jobs: uses: actions/setup-dotnet@v4 with: dotnet-version: '9.0.x' - - name: Cache SonarQube Cloud packages - uses: actions/cache@v4 - with: - path: ~/.sonar/cache - key: ${{ runner.os }}-sonar - restore-keys: ${{ runner.os }}-sonar - - name: Cache SonarQube Cloud scanner - id: cache-sonar-scanner - uses: actions/cache@v4 - with: - path: ~/.sonar/scanner - key: ${{ runner.os }}-sonar-scanner - restore-keys: ${{ runner.os }}-sonar-scanner - name: Install SonarQube Cloud scanner - if: steps.cache-sonar-scanner.outputs.cache-hit != 'true' run: | mkdir -p ~/.sonar/scanner - dotnet tool update dotnet-sonarscanner --tool-path ~/.sonar/scanner + dotnet tool install dotnet-sonarscanner --tool-path ~/.sonar/scanner - name: Restore dependencies - run: dotnet restore + run: dotnet restore --verbosity normal - name: Build and analyze env: SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }} run: | + echo "Starting SonarQube analysis..." + echo "Current directory: $(pwd)" + echo "Listing files:" + ls -la + echo "Installing SonarQube scanner..." ~/.sonar/scanner/dotnet-sonarscanner begin /k:"mrleo1nid_chatbot" /o:"mrleo1nid" /d:sonar.token="${{ secrets.SONAR_TOKEN }}" - dotnet build + echo "Building project..." + dotnet build --verbosity normal + echo "Ending SonarQube analysis..." ~/.sonar/scanner/dotnet-sonarscanner end /d:sonar.token="${{ secrets.SONAR_TOKEN }}" \ No newline at end of file