add cov
This commit is contained in:
@@ -26,9 +26,11 @@ jobs:
|
||||
run: |
|
||||
mkdir -p ~/.sonar/scanner
|
||||
dotnet tool install dotnet-sonarscanner --tool-path ~/.sonar/scanner
|
||||
- name: Install dotnet-coverage
|
||||
run: dotnet tool install --global dotnet-coverage
|
||||
- name: Restore dependencies
|
||||
run: dotnet restore --verbosity normal
|
||||
- name: Build and analyze
|
||||
- name: SonarQube begin
|
||||
env:
|
||||
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}
|
||||
run: |
|
||||
@@ -37,8 +39,21 @@ jobs:
|
||||
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 }}" /d:sonar.cs.vscoveragexml.reportsPaths=coverage.xml
|
||||
|
||||
- name: Build project
|
||||
run: |
|
||||
echo "Building project..."
|
||||
dotnet build --verbosity normal
|
||||
|
||||
- name: Run tests with coverage
|
||||
run: |
|
||||
echo "Running tests with coverage..."
|
||||
dotnet-coverage collect "dotnet test" -f xml -o "coverage.xml"
|
||||
|
||||
- name: SonarQube end
|
||||
env:
|
||||
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}
|
||||
run: |
|
||||
echo "Ending SonarQube analysis..."
|
||||
~/.sonar/scanner/dotnet-sonarscanner end /d:sonar.token="${{ secrets.SONAR_TOKEN }}"
|
||||
Reference in New Issue
Block a user