Skip to content
This repository was archived by the owner on Aug 29, 2025. It is now read-only.
Merged
Show file tree
Hide file tree
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
20 changes: 8 additions & 12 deletions .github/workflows/sonarcloud.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,10 @@ on:
push:
branches:
- main
paths-ignore: ['**.md', '.vscode/**', '**.svg']
paths-ignore: ["**.md", ".vscode/**", "**.svg"]
pull_request:
types: [opened, synchronize, reopened]
paths-ignore: ['**.md', '.vscode/**', '**.svg']
paths-ignore: ["**.md", ".vscode/**", "**.svg"]

env:
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}
Expand All @@ -22,7 +22,7 @@ jobs:
- name: Check whether unity activation requests should be done
id: checksecret_job
run: |
echo "is_SONAR_TOKEN_set=${{ env.SONAR_TOKEN != '' }}" >> $GITHUB_OUTPUT
echo "is_SONAR_TOKEN_set=${{ env.SONAR_TOKEN != '' }}" >> $GITHUB_OUTPUT
build:
needs: [checksecret]
if: needs.checksecret.outputs.is_SONAR_TOKEN_set == 'true'
Expand All @@ -32,19 +32,15 @@ jobs:
- name: Set up JDK 17
uses: actions/setup-java@v4
with:
distribution: 'adopt'
distribution: "adopt"
java-version: 17
- name: Setup .NET 5 # At the moment the scanner requires dotnet 5 https://www.nuget.org/packages/dotnet-sonarscanner
uses: actions/setup-dotnet@v4
with:
dotnet-version: 5.0.x
- name: Setup .NET
uses: actions/setup-dotnet@v4
with:
dotnet-version: 7.0.x
dotnet-version: 9.x
- uses: actions/checkout@v4
with:
fetch-depth: 0 # Shallow clones should be disabled for a better relevancy of analysis
fetch-depth: 0 # Shallow clones should be disabled for a better relevancy of analysis
- name: Cache SonarCloud packages
uses: actions/cache@v4
with:
Expand All @@ -55,9 +51,9 @@ jobs:
run: dotnet tool install dotnet-sonarscanner --create-manifest-if-needed
- name: Build and analyze
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} # Needed to get PR information, if any
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} # Needed to get PR information, if any
CollectCoverage: true
CoverletOutputFormat: 'opencover' # https://github.com/microsoft/vstest/issues/4014#issuecomment-1307913682
CoverletOutputFormat: "opencover" # https://github.com/microsoft/vstest/issues/4014#issuecomment-1307913682
shell: pwsh
run: |
dotnet tool run dotnet-sonarscanner begin /k:"microsoftgraph_msgraph-cli-core" /o:"microsoftgraph2" /d:sonar.token="${{ secrets.SONAR_TOKEN }}" /d:sonar.host.url="https://sonarcloud.io" /d:sonar.cs.opencover.reportsPaths="**/*.Tests/**/coverage.opencover.xml" /d:sonar.coverage.exclusions="src/sample/**"
Expand Down
32 changes: 16 additions & 16 deletions src/Microsoft.Graph.Cli.Core/Microsoft.Graph.Cli.Core.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -47,26 +47,26 @@
<DefineConstants>OS_WINDOWS</DefineConstants>
</PropertyGroup>
<ItemGroup>
<PackageReference Include="Azure.Identity" Version="1.13.1"/>
<PackageReference Include="Azure.Identity.Broker" Version="1.2.0" Condition="'$(OS)' == 'Windows_NT'"/>
<PackageReference Include="JmesPath.Net" Version="1.0.330"/>
<PackageReference Include="Microsoft.Extensions.Hosting" Version="8.0.1"/>
<PackageReference Include="Microsoft.Extensions.Http" Version="9.0.0"/>
<PackageReference Include="Microsoft.Graph.Core" Version="3.2.2"/>
<PackageReference Include="Microsoft.Kiota.Authentication.Azure" Version="1.16.3"/>
<PackageReference Include="Microsoft.Kiota.Cli.Commons" Version="1.1.2"/>
<PackageReference Include="Microsoft.Kiota.Http.HttpClientLibrary" Version="1.16.3"/>
<PackageReference Include="Microsoft.Kiota.Serialization.Json" Version="1.16.3"/>
<PackageReference Include="Spectre.Console" Version="0.49.1"/>
<PackageReference Include="System.CommandLine" Version="2.0.0-beta4.22272.1"/>
<PackageReference Include="Microsoft.SourceLink.GitHub" Version="8.0.0" PrivateAssets="All"/>
<PackageReference Include="Azure.Identity" Version="1.13.1" />
<PackageReference Include="Azure.Identity.Broker" Version="1.2.0" Condition="'$(OS)' == 'Windows_NT'" />
<PackageReference Include="JmesPath.Net" Version="1.0.330" />
<PackageReference Include="Microsoft.Extensions.Hosting" Version="9.0.1" />
<PackageReference Include="Microsoft.Extensions.Http" Version="9.0.1" />
<PackageReference Include="Microsoft.Graph.Core" Version="3.2.2" />
<PackageReference Include="Microsoft.Kiota.Authentication.Azure" Version="1.16.3" />
<PackageReference Include="Microsoft.Kiota.Cli.Commons" Version="1.1.2" />
<PackageReference Include="Microsoft.Kiota.Http.HttpClientLibrary" Version="1.16.3" />
<PackageReference Include="Microsoft.Kiota.Serialization.Json" Version="1.16.3" />
<PackageReference Include="Spectre.Console" Version="0.49.1" />
<PackageReference Include="System.CommandLine" Version="2.0.0-beta4.22272.1" />
<PackageReference Include="Microsoft.SourceLink.GitHub" Version="8.0.0" PrivateAssets="All" />
</ItemGroup>

<ItemGroup>
<None Include="../../LICENSE" Pack="true" PackagePath=""/>
<None Include="../../README.md" Pack="true" PackagePath=""/>
<None Include="../../LICENSE" Pack="true" PackagePath="" />
<None Include="../../README.md" Pack="true" PackagePath="" />
</ItemGroup>
<ItemGroup>
<InternalsVisibleTo Include="Microsoft.Graph.Cli.Core.Tests"/>
<InternalsVisibleTo Include="Microsoft.Graph.Cli.Core.Tests" />
</ItemGroup>
</Project>
6 changes: 3 additions & 3 deletions src/sample/sample.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,9 @@
</PropertyGroup>

<ItemGroup>
<PackageReference Include="Microsoft.Extensions.Configuration" Version="9.0.0" />
<PackageReference Include="Microsoft.Extensions.Configuration.Json" Version="8.0.1" />
<PackageReference Include="Microsoft.Extensions.Hosting" Version="8.0.1" />
<PackageReference Include="Microsoft.Extensions.Configuration" Version="9.0.1" />
<PackageReference Include="Microsoft.Extensions.Configuration.Json" Version="9.0.1" />
<PackageReference Include="Microsoft.Extensions.Hosting" Version="9.0.1" />
<PackageReference Include="Microsoft.Kiota.Authentication.Azure" Version="1.16.3" />
<PackageReference Include="Microsoft.Kiota.Serialization.Json" Version="1.16.3" />
<PackageReference Include="System.CommandLine" Version="2.0.0-beta4.22272.1" />
Expand Down
Loading