forked from microsoft/RulesEngine
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #12 from asulwer/Code-Coverage
adding back code-coverage
- Loading branch information
Showing
9 changed files
with
48 additions
and
10 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 |
---|---|---|
|
@@ -23,4 +23,21 @@ jobs: | |
run: dotnet build RulesEngine.sln --configuration Debug --no-restore | ||
|
||
- name: Test | ||
run: dotnet test RulesEngine.sln --collect:"XPlat Code Coverage" --no-build --configuration Debug --verbosity m | ||
run: dotnet test RulesEngine.sln --collect:"XPlat Code Coverage" --no-build --configuration Debug --verbosity m | ||
|
||
- name: Install Report Tool | ||
run: dotnet tool install --tool-path tools dotnet-reportgenerator-globaltool | ||
|
||
- name: Generate Report | ||
run: ./tools/reportgenerator "-reports:**/coverage.cobertura.xml" "-targetdir:coveragereport" -reporttypes:"Html;lcov;Cobertura" | ||
|
||
- name: Check Coverage | ||
shell: pwsh | ||
run: ./scripts/check-coverage.ps1 -reportPath coveragereport/Cobertura.xml -threshold 96 | ||
|
||
- name: Coveralls GitHub Action | ||
uses: coverallsapp/[email protected] | ||
if: ${{ github.event_name == 'push' }} | ||
with: | ||
github-token: ${{ secrets.GITHUB_TOKEN }} | ||
path-to-lcov: ./coveragereport/lcov.info |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,8 +1,7 @@ | ||
### Roadmap for RulesEngineEx, formerlly known as [RulesEngine}(https://github.com/microsoft/RulesEngine). | ||
|
||
- WorkflowName and RuleName will be changed to Name | ||
- WorkflowName and RuleName properties changed to Name | ||
- seems redundant to say Workflow.WorkflowName or Rule.RuleName | ||
- [X]Add CancellationToken Token for Async [[/microsoft/RulesEngine/issues/609](https://github.com/microsoft/RulesEngine/issues/609)] | ||
- [X]Refactor Code and add comments for readability | ||
- [X]Fix Issues from the original project | ||
- Go From Moq to NSubstitute | ||
- [X]Fix oustanding Issues from the original project |
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,16 @@ | ||
param( | ||
[Parameter(Mandatory=$true)][string] $reportPath, | ||
[Parameter(Mandatory=$true)][decimal] $threshold | ||
) | ||
|
||
|
||
[XML]$report = Get-Content $reportPath; | ||
[decimal]$coverage = [decimal]$report.coverage.'line-rate' * 100; | ||
|
||
if ($coverage -lt $threshold) { | ||
Write-Error "Coverage ($coverage) < $threshold percent" | ||
exit 1 | ||
} | ||
else{ | ||
Write-Host "Coverage ($coverage) > $threshold percent" | ||
} |
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,2 @@ | ||
dotnet tool install --tool-path tools dotnet-reportgenerator-globaltool | ||
./tools/reportgenerator "-reports:**/coverage.cobertura.xml" "-targetdir:coveragereport" -reporttypes:"Html;lcov;Cobertura" |
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
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