elsa-core/test/Directory.Build.props
Sipke Schoorstra 8747151330
Add code coverage configuration and adjust test projects (#7049)
* Add code coverage configuration and adjust test projects

- Introduced `Include` and `Threshold` properties across test project files for improved code coverage tracking.
- Added `coverlet.collector` as a dependency for coverage data collection.
- Removed unused `global using` directives and redundant imports for cleaner test codebases.

* Update GitHub Actions workflows for pull request triggers

- Adjusted `pr.yml` to include `patch/*` and `develop/*` branches.
- Removed redundant pull request triggers in `packages.yml` for cleaner configuration.

* Expand pull request triggers in GitHub Actions

- Renamed `PR` workflow to `pr` for consistency.
- Included `patch/*` and `develop/*` branches in `pr.yml` and `Build.CI.GitHubActions.cs`.

* Remove pack target from pull request workflows

- Updated `pr.yml` to exclude the pack step.
- Adjusted `Build.CI.GitHubActions.cs` to reflect the removal of the pack target.

* Remove `Elsa.Workflows.Api` from integration test project references

- Updated `Elsa.Workflows.IntegrationTests.csproj` to exclude `Elsa.Workflows.Api` from the `Include` list and project references for cleanup and simplification.
2025-11-12 13:59:36 +01:00

43 lines
1.9 KiB
XML

<Project>
<Import Project="$([MSBuild]::GetPathOfFileAbove('Directory.Build.props', '$(MSBuildThisFileDirectory)../'))"/>
<PropertyGroup>
<TargetFramework>net9.0</TargetFramework>
<ImplicitUsings>enable</ImplicitUsings>
<Nullable>enable</Nullable>
<IsPackable>false</IsPackable>
<IsTestProject>true</IsTestProject>
<GenerateDocumentationFile>false</GenerateDocumentationFile>
<CollectCoverage Condition="'$(CollectCoverage)' == ''">true</CollectCoverage>
<CoverletOutputFormat Condition="'$(CoverletOutputFormat)' == ''">cobertura,lcov,opencover</CoverletOutputFormat>
<CoverletOutput Condition="'$(CoverletOutput)' == ''">$(MSBuildThisFileDirectory)../artifacts/coverage/$(MSBuildProjectName)/coverage</CoverletOutput>
<Threshold Condition="'$(Threshold)' == ''">10</Threshold>
<ThresholdType Condition="'$(ThresholdType)' == ''">line</ThresholdType>
<ThresholdStat Condition="'$(ThresholdStat)' == ''">total</ThresholdStat>
<Exclude>
[*Elsa.Testing.Shared*]*
</Exclude>
</PropertyGroup>
<ItemGroup>
<PackageReference Include="GitHubActionsTestLogger"/>
<PackageReference Include="Microsoft.AspNetCore.Mvc.Testing"/>
<PackageReference Include="Microsoft.NET.Test.Sdk"/>
<PackageReference Include="Moq"/>
<PackageReference Include="NSubstitute"/>
<PackageReference Include="coverlet.msbuild"/>
<PackageReference Include="coverlet.collector">
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
</PackageReference>
<PackageReference Include="xunit"/>
<PackageReference Include="xunit.runner.visualstudio" PrivateAssets="all"/>
</ItemGroup>
<ItemGroup>
<Using Include="Xunit"/>
</ItemGroup>
</Project>