ww
This commit is contained in:
@@ -22,43 +22,43 @@ jobs:
|
|||||||
PATH: ${{ env.PATH }}:/root/.dotnet/tools
|
PATH: ${{ env.PATH }}:/root/.dotnet/tools
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout code
|
- name: Checkout code
|
||||||
run: /bin/bash -c |
|
run: /bin/sh -c |
|
||||||
echo "Checking out code..."
|
echo "Checking out code..."
|
||||||
echo "Current directory: $(pwd)"
|
echo "Current directory: $(pwd)"
|
||||||
echo "Files in current directory:"
|
echo "Files in current directory:"
|
||||||
ls -la
|
ls -la
|
||||||
|
|
||||||
- name: Setup .NET
|
- name: Setup .NET
|
||||||
run: /bin/bash -c |
|
run: /bin/sh -c |
|
||||||
echo "Setting up .NET..."
|
echo "Setting up .NET..."
|
||||||
dotnet --version
|
dotnet --version
|
||||||
echo "Dotnet is available"
|
echo "Dotnet is available"
|
||||||
|
|
||||||
- name: Restore dependencies
|
- name: Restore dependencies
|
||||||
run: /bin/bash -c "dotnet restore"
|
run: /bin/sh -c "dotnet restore"
|
||||||
|
|
||||||
- name: Install dotnet-coverage
|
- name: Install dotnet-coverage
|
||||||
run: /bin/bash -c |
|
run: /bin/sh -c |
|
||||||
dotnet tool install --global dotnet-coverage
|
dotnet tool install --global dotnet-coverage
|
||||||
echo "Adding .dotnet/tools to PATH..."
|
echo "Adding .dotnet/tools to PATH..."
|
||||||
echo 'export PATH="$PATH:/root/.dotnet/tools"' >> ~/.bashrc
|
echo 'export PATH="$PATH:/root/.dotnet/tools"' >> ~/.profile
|
||||||
export PATH="$PATH:/root/.dotnet/tools"
|
export PATH="$PATH:/root/.dotnet/tools"
|
||||||
echo "dotnet-coverage location:"
|
echo "dotnet-coverage location:"
|
||||||
which dotnet-coverage || echo "dotnet-coverage not found in PATH"
|
which dotnet-coverage || echo "dotnet-coverage not found in PATH"
|
||||||
ls -la /root/.dotnet/tools/ | grep dotnet-coverage || echo "No dotnet-coverage in tools directory"
|
ls -la /root/.dotnet/tools/ | grep dotnet-coverage || echo "No dotnet-coverage in tools directory"
|
||||||
|
|
||||||
- name: Install SonarCloud Scanner
|
- name: Install SonarCloud Scanner
|
||||||
run: /bin/bash -c "dotnet tool update dotnet-sonarscanner --tool-path ./.sonar/scanner"
|
run: /bin/sh -c "dotnet tool update dotnet-sonarscanner --tool-path ./.sonar/scanner"
|
||||||
- name: Begin SonarCloud analysis
|
- name: Begin SonarCloud analysis
|
||||||
run: /bin/bash -c "./.sonar/scanner/dotnet-sonarscanner begin /k:\"${{ env.SONAR_PROJECT_KEY }}\" /o:\"${{ env.SONAR_ORG }}\" /d:sonar.token=\"${{ secrets.SONAR_TOKEN }}\" /d:sonar.host.url=\"${{ env.SONAR_HOST_URL }}\" /d:sonar.cs.vscoveragexml.reportsPaths=\"coverage.xml\""
|
run: /bin/sh -c "./.sonar/scanner/dotnet-sonarscanner begin /k:\"${{ env.SONAR_PROJECT_KEY }}\" /o:\"${{ env.SONAR_ORG }}\" /d:sonar.token=\"${{ secrets.SONAR_TOKEN }}\" /d:sonar.host.url=\"${{ env.SONAR_HOST_URL }}\" /d:sonar.cs.vscoveragexml.reportsPaths=\"coverage.xml\""
|
||||||
env:
|
env:
|
||||||
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}
|
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}
|
||||||
|
|
||||||
- name: Build
|
- name: Build
|
||||||
run: /bin/bash -c "dotnet build --no-incremental"
|
run: /bin/sh -c "dotnet build --no-incremental"
|
||||||
|
|
||||||
- name: Run tests and collect coverage
|
- name: Run tests and collect coverage
|
||||||
run: /bin/bash -c |
|
run: /bin/sh -c |
|
||||||
echo "Running tests and collecting coverage..."
|
echo "Running tests and collecting coverage..."
|
||||||
echo "PATH: $PATH"
|
echo "PATH: $PATH"
|
||||||
echo "Trying dotnet-coverage from PATH..."
|
echo "Trying dotnet-coverage from PATH..."
|
||||||
@@ -76,12 +76,12 @@ jobs:
|
|||||||
fi
|
fi
|
||||||
|
|
||||||
- name: List files for debug
|
- name: List files for debug
|
||||||
run: /bin/bash -c "ls -la"
|
run: /bin/sh -c "ls -la"
|
||||||
|
|
||||||
- name: Print coverage.xml for debug
|
- name: Print coverage.xml for debug
|
||||||
run: /bin/bash -c "cat coverage.xml"
|
run: /bin/sh -c "cat coverage.xml"
|
||||||
|
|
||||||
- name: End SonarCloud analysis
|
- name: End SonarCloud analysis
|
||||||
run: /bin/bash -c "./.sonar/scanner/dotnet-sonarscanner end /d:sonar.token=\"${{ secrets.SONAR_TOKEN }}\""
|
run: /bin/sh -c "./.sonar/scanner/dotnet-sonarscanner end /d:sonar.token=\"${{ secrets.SONAR_TOKEN }}\""
|
||||||
env:
|
env:
|
||||||
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}
|
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}
|
||||||
Reference in New Issue
Block a user