Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update SonarScan for .NET #2

Merged
merged 1 commit into from
Dec 29, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
67 changes: 33 additions & 34 deletions .github/workflows/ci_analyze.yml
Original file line number Diff line number Diff line change
@@ -1,35 +1,34 @@
# Reenable when it supports .net 8
### Build and tests all pushes, also code coverage
name: 🔍 CI Analyze sources
on:
push:
branches:
- main

jobs:
sonarscanner:
name: 🔍 SonarScanner
environment: CI - analyze environment
runs-on: ubuntu-latest
steps:
- name: 📤 Checkout the repository
uses: actions/checkout@main
with:
# Shallow clones should be disabled for a better relevancy of analysis
fetch-depth: 0

#### Build and tests all pushes, also code coverage
# name: 🔍 CI Analyze sources
# on:
# push:
# branches:
# - main
# jobs:
# sonarscanner:
# name: 🔍 SonarScanner
# environment: CI - analyze environment
# runs-on: ubuntu-latest
# steps:
# - name: 📤 Checkout the repository
# uses: actions/checkout@main
# with:
# # Shallow clones should be disabled for a better relevancy of analysis
# fetch-depth: 0
#
# - name: 🔍 Analyze code
# uses: highbyte/[email protected]
# env:
# SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}
# GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
# with:
# sonarOrganization: net-daemon
# sonarProjectKey: net-daemon_netdaemon
# sonarProjectName: netdaemon
# dotnetTestArguments: --logger trx /p:CollectCoverage=true /p:CoverletOutputFormat=opencover
# sonarBeginArguments: >-
# /d:sonar.inclusions="**/src/**"
# /d:sonar.test.inclusions="**/tests/**"
# /d:sonar.cs.xunit.reportsPaths="**/tests/**/TestResults/*.trx"
# /d:sonar.cs.opencover.reportsPaths="**/tests/**/coverage.opencover.xml"
- name: 🔍 Analyze code
uses: highbyte/[email protected]
env:
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
sonarOrganization: net-daemon
sonarProjectKey: net-daemon_netdaemon
sonarProjectName: netdaemon
dotnetTestArguments: --logger trx /p:CollectCoverage=true /p:CoverletOutputFormat=opencover
sonarBeginArguments: >-
/d:sonar.inclusions="**/src/**"
/d:sonar.test.inclusions="**/tests/**"
/d:sonar.cs.xunit.reportsPaths="**/tests/**/TestResults/*.trx"
/d:sonar.cs.opencover.reportsPaths="**/tests/**/coverage.opencover.xml"
Loading