forked from reactivemarbles/DynamicData
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
housekeeping: use sonar cloud code coveage (reactivemarbles#764)
* housekeeping: use sonar cloud code coveage Trying dotcover from jetbrains as the tool that collects the coverage information. Using sonar cloud to store the coverage information. * Update pr-test-coverage.yml * Update pr-test-coverage.yml * Update pr-test-coverage.yml * Update pr-test-coverage.yml * Update pr-test-coverage.yml * Update ci-build.yml * Update SizeLimitFixture.cs * Update pr-test-coverage.yml * Delete codecov.yaml * Update pr-test-coverage.yml * Update pr-test-coverage.yml * Update pr-test-coverage.yml * Update pr-test-coverage.yml * Update pr-test-coverage.yml * Update pr-test-coverage.yml * Update DynamicData.Tests.csproj
- Loading branch information
1 parent
f6eadfe
commit 33bbe3e
Showing
5 changed files
with
67 additions
and
23 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -46,19 +46,6 @@ jobs: | |
- name: Pack | ||
run: dotnet pack --no-restore --configuration Release DynamicData.sln | ||
working-directory: src | ||
|
||
- name: Run Unit Tests and Generate Coverage | ||
uses: glennawatson/[email protected] | ||
with: | ||
project-files: '**/*Tests*.csproj' | ||
no-build: true | ||
exclude-filter: '[${{env.productNamespacePrefix}}.*.Tests.*]*' | ||
include-filter: '[${{env.productNamespacePrefix}}*]*' | ||
output-format: cobertura | ||
configuration: ${{ env.configuration }} | ||
|
||
- name: Upload Code Coverage | ||
uses: codecov/codecov-action@v3 | ||
|
||
- name: Create NuGet Artifacts | ||
uses: actions/upload-artifact@master | ||
|
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,66 @@ | ||
name: Test Coverage and Quality | ||
|
||
on: | ||
push: | ||
branches: [ "main" ] | ||
pull_request: | ||
branches: [ "main" ] | ||
|
||
jobs: | ||
|
||
build: | ||
|
||
strategy: | ||
matrix: | ||
configuration: [Release] # future support for more coverage | ||
|
||
runs-on: windows-latest | ||
|
||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v3 | ||
with: | ||
fetch-depth: 0 | ||
- name: Set up JDK | ||
uses: actions/setup-java@v3 | ||
with: | ||
java-version: | | ||
21 | ||
distribution: 'zulu' # Alternative distribution options are available. | ||
|
||
# Install the .NET Core workload | ||
- name: Install .NET | ||
uses: actions/setup-dotnet@v3 | ||
with: | ||
dotnet-version: | | ||
6.0.x | ||
7.0.x | ||
8.0.x | ||
- name: Cache SonarCloud packages | ||
uses: actions/cache@v3 | ||
with: | ||
path: ~\sonar\cache | ||
key: ${{ runner.os }}-sonar | ||
restore-keys: ${{ runner.os }}-sonar | ||
|
||
- name: Install SonarCloud scanner | ||
run: | | ||
dotnet tool install -g dotnet-sonarscanner | ||
- name: Install JetBrains DotCover | ||
run: dotnet tool install --global JetBrains.dotCover.GlobalTool | ||
|
||
- name: NuGet Restore | ||
run: dotnet restore DynamicData.sln | ||
working-directory: src | ||
|
||
- name: Run coverage tests | ||
run: | | ||
dotnet sonarscanner begin /k:"reactivemarbles_DynamicData" /o:"reactivemarbles" /d:sonar.token="${{ env.SONAR_TOKEN }}" /d:sonar.cs.dotcover.reportsPaths=dotCover.Output.html /d:sonar.host.url="https://sonarcloud.io" | ||
dotnet build --no-restore --no-incremental --configuration ${{ matrix.configuration }} DynamicData.sln | ||
dotnet dotcover test --dcReportType=HTML --no-restore --configuration ${{ matrix.configuration }} | ||
dotnet sonarscanner end /d:sonar.token="${{ env.SONAR_TOKEN }}" | ||
env: | ||
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }} | ||
working-directory: src |
This file was deleted.
Oops, something went wrong.
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 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