fb
This commit is contained in:
@@ -22,30 +22,23 @@ jobs:
|
|||||||
uses: actions/setup-dotnet@v4
|
uses: actions/setup-dotnet@v4
|
||||||
with:
|
with:
|
||||||
dotnet-version: '9.0.x'
|
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
|
- name: Install SonarQube Cloud scanner
|
||||||
if: steps.cache-sonar-scanner.outputs.cache-hit != 'true'
|
|
||||||
run: |
|
run: |
|
||||||
mkdir -p ~/.sonar/scanner
|
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
|
- name: Restore dependencies
|
||||||
run: dotnet restore
|
run: dotnet restore --verbosity normal
|
||||||
- name: Build and analyze
|
- name: Build and analyze
|
||||||
env:
|
env:
|
||||||
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}
|
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}
|
||||||
run: |
|
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 }}"
|
~/.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 }}"
|
~/.sonar/scanner/dotnet-sonarscanner end /d:sonar.token="${{ secrets.SONAR_TOKEN }}"
|
||||||
Reference in New Issue
Block a user