sonar analysis #8
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# This workflow will build a .NET project | ||
# For more information see: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-net | ||
name: Build and Analyze with SonarCloud | ||
on: | ||
push: | ||
branches: [ "develop", "devon4net_github_actions" ] | ||
pull_request: | ||
branches: [ "develop", "devon4net_github_actions" ] | ||
jobs: | ||
build: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v3 | ||
- name: Setup .NET | ||
uses: actions/setup-dotnet@v3 | ||
with: | ||
dotnet-version: 6.0.x | ||
# - name: build | ||
# run: | | ||
# cd source | ||
# dotnet restore | ||
# dotnet build | ||
- name: Build and analyze | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} # Needed to get PR information, if any | ||
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }} | ||
# shell: powershell | ||
run: | | ||
cd source | ||
.\.sonar\scanner\dotnet-sonarscanner begin /k:"JosepFe_devon4net" /o:"josepfe" /d:sonar.token="${{ secrets.SONAR_TOKEN }}" /d:sonar.host.url="https://sonarcloud.io" | ||
dotnet restore | ||
dotnet build | ||
.\.sonar\scanner\dotnet-sonarscanner end /d:sonar.token="${{ secrets.SONAR_TOKEN }}" | ||
# - name: Analyze with SonarCloud | ||
# uses: sonarsource/sonarcloud-github-action@v1 | ||
# with: | ||
# project-key: ${{ secrets.SONAR_PROJECT_KEY }} | ||
# project-name: "devon4net" | ||
# token: ${{ secrets.SONAR_TOKEN }} | ||
# github-token: ${{ secrets.GITHUB_TOKEN }} |