Skip to content

Commit

Permalink
add sonar coverage (#14)
Browse files Browse the repository at this point in the history
* add sonar coverage

* specify a solution for restore.

* fix: add report generator

* remove codeql and sonacloud yml file.
  • Loading branch information
christianrd authored Sep 23, 2024
1 parent 9f336a5 commit 9daf97c
Show file tree
Hide file tree
Showing 9 changed files with 18 additions and 195 deletions.
30 changes: 0 additions & 30 deletions .dockerignore

This file was deleted.

61 changes: 16 additions & 45 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -38,21 +38,30 @@ jobs:
- name: Install .NET
uses: actions/setup-dotnet@v4
with:
dotnet-version: ${{ env.DOTNET_VERSION }}

- name: Restore solution
run: dotnet restore
run: dotnet restore ${{ env.SOLUTION_PATH }}

- name: Build solution
run: dotnet build --no-restore --configuration Release

- name: Test solution
run: dotnet test --no-build --configuration Release --filter "FullyQualifiedName!~AcceptanceTests"
run: dotnet build ${{ env.SOLUTION_PATH }} --no-restore --configuration Release

- name: Test solution with coverage
run: |
dotnet test ${{ env.SOLUTION_PATH }} --no-build --configuration Release --collect:"Code Coverage" --results-directory ./TestResults -- DataCollectionRunSettings.DataCollectors.DataCollector.Configuration.Format=opencover
- name: Analyze with SonarCloud
- name: SonarCloud Scan
uses: sonarsource/[email protected]
env:
SONAR_TOKEN: ${{ secrets.SONARCLOUND_TOKEN }}

with:
args: >
-Dsonar.projectKey=christianrd_FastCleanArchitecture
-Dsonar.organization=christianrd
-Dsonar.cs.opencover.reportPaths=TestResults/coverage.opencover.xml
-Dsonar.Tests=tests/
- name: Publish website
if: ${{ inputs.build-artifacts == true }}
run: |
Expand All @@ -67,42 +76,4 @@ jobs:
with:
name: website
path: ./src/API/publish/publish.zip
if-no-files-found: error

- name: Create EF Core migrations bundle - Install tool-manifest
if: ${{ inputs.build-artifacts == true }}
run: |
dotnet new tool-manifest
env:
SkipNSwag: True

- name: Create EF Core migrations bundle - Install dotnet-ef
if: ${{ inputs.build-artifacts == true }}
run: |
dotnet tool install dotnet-ef --version 8.0.1
env:
SkipNSwag: True


- name: Create EF Core migrations bundle - bundle migrations
if: ${{ inputs.build-artifacts == true }}
run: |
dotnet ef migrations bundle --configuration Release -p ./src/Infrastructure/ -s ./src/API/ -o efbundle.exe
env:
SkipNSwag: True


- name: Create EF Core migrations bundle - zip migrations bundle
if: ${{ inputs.build-artifacts == true }}
run: |
zip -r ./efbundle.zip efbundle.exe
env:
SkipNSwag: True

- name: Upload EF Core migrations bundle artifact (efbundle)
if: ${{ inputs.build-artifacts == true }}
uses: actions/upload-artifact@v4
with:
name: efbundle
path: ./efbundle.zip
if-no-files-found: error
41 changes: 0 additions & 41 deletions .github/workflows/codeql.yml

This file was deleted.

2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

[![Nuget](https://img.shields.io/nuget/v/Fast.Clean.Architecture.Solution.Template?label=NuGet)](https://www.nuget.org/packages/Fast.Clean.Architecture.Solution.Template)
[![Nuget](https://img.shields.io/nuget/dt/Fast.Clean.Architecture.Solution.Template?label=Downloads)](https://www.nuget.org/packages/Fast.Clean.Architecture.Solution.Template)
[![Quality gate](https://sonarcloud.io/api/project_badges/quality_gate?project=christianrd_FastCleanArchitecture)](https://sonarcloud.io/summary/new_code?id=christianrd_FastCleanArchitecture)
[![Quality Gate Status](https://sonarcloud.io/api/project_badges/measure?project=christianrd_FastCleanArchitecture&metric=alert_status)](https://sonarcloud.io/summary/new_code?id=christianrd_FastCleanArchitecture)

The purpose of this template is to offer a simple and effective solution for building enterprise applications
by harnessing the capabilities of Clean Architecture and ASP.NET Core.
Expand Down
19 changes: 0 additions & 19 deletions docker-compose.dcproj

This file was deleted.

14 changes: 0 additions & 14 deletions docker-compose.override.yml

This file was deleted.

27 changes: 0 additions & 27 deletions docker-compose.yml

This file was deleted.

8 changes: 1 addition & 7 deletions fastCleanArchitecture.sln
Original file line number Diff line number Diff line change
Expand Up @@ -29,9 +29,7 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Solution Items", "Solution
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "ArchitectureTests", "tests\ArchitectureTests\ArchitectureTests.csproj", "{49D62606-1540-475F-94F8-315CBE04728D}"
EndProject
Project("{E53339B2-1760-4266-BCC7-CA923CBCF16C}") = "docker-compose", "docker-compose.dcproj", "{34BB3069-D5D0-4046-ACAD-A2025ED7678F}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Application.IntegrationTests", "tests\Application.IntegrationTests\Application.IntegrationTests.csproj", "{F1F77627-2298-4497-8016-943605A752ED}"
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Application.IntegrationTests", "tests\Application.IntegrationTests\Application.IntegrationTests.csproj", "{F1F77627-2298-4497-8016-943605A752ED}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Expand Down Expand Up @@ -67,10 +65,6 @@ Global
{49D62606-1540-475F-94F8-315CBE04728D}.Debug|Any CPU.Build.0 = Debug|Any CPU
{49D62606-1540-475F-94F8-315CBE04728D}.Release|Any CPU.ActiveCfg = Release|Any CPU
{49D62606-1540-475F-94F8-315CBE04728D}.Release|Any CPU.Build.0 = Release|Any CPU
{34BB3069-D5D0-4046-ACAD-A2025ED7678F}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{34BB3069-D5D0-4046-ACAD-A2025ED7678F}.Debug|Any CPU.Build.0 = Debug|Any CPU
{34BB3069-D5D0-4046-ACAD-A2025ED7678F}.Release|Any CPU.ActiveCfg = Release|Any CPU
{34BB3069-D5D0-4046-ACAD-A2025ED7678F}.Release|Any CPU.Build.0 = Release|Any CPU
{F1F77627-2298-4497-8016-943605A752ED}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{F1F77627-2298-4497-8016-943605A752ED}.Debug|Any CPU.Build.0 = Debug|Any CPU
{F1F77627-2298-4497-8016-943605A752ED}.Release|Any CPU.ActiveCfg = Release|Any CPU
Expand Down
11 changes: 0 additions & 11 deletions launchSettings.json

This file was deleted.

0 comments on commit 9daf97c

Please sign in to comment.