Skip to content
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
30 changes: 5 additions & 25 deletions .github/workflows/CI.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@ on:

env:
ArtifactsDirectoryName: 'artifacts'
TestResultsDirectoryName: 'coverage'
CommonTestArguments: '--no-restore --no-build --logger trx /noautorsp'
BuildConfiguration: 'Debug'
BuildPlatform: 'Any CPU'
Expand All @@ -30,7 +29,7 @@ jobs:
testarguments: ''
- os: ubuntu-latest
name: Linux
testarguments: '--collect:"XPlat Code Coverage"'
testarguments: ''
- os: macos-latest
name: MacOS
testarguments: ''
Expand All @@ -45,17 +44,17 @@ jobs:
with:
fetch-depth: 0

- name: Install .NET 6.x and 8.x
- name: Install .NET 8.x and 9.x
uses: actions/setup-dotnet@v4
with:
dotnet-version: |
6.x
8.x
9.x

- name: Install .NET 9.0
- name: Install .NET 10.0
uses: actions/setup-dotnet@v4
with:
dotnet-version: 9.x
dotnet-version: 10.x
dotnet-quality: 'preview'

- name: Build Solution
Expand All @@ -65,31 +64,12 @@ jobs:
if: ${{ matrix.name == 'Windows' }}
run: dotnet test ${{ env.CommonTestArguments }} ${{ matrix.TestArguments}} --framework net472 "/Property:Platform=${{ env.BuildPlatform }};Configuration=${{ env.BuildConfiguration }}" "/BinaryLogger:${{ env.ArtifactsDirectoryName }}/test-net472.binlog"

- name: Run Unit Tests (.NET 6.0)
run: dotnet test ${{ env.CommonTestArguments }} ${{ matrix.TestArguments}} --framework net6.0 "/Property:Platform=${{ env.BuildPlatform }};Configuration=${{ env.BuildConfiguration }}" "/BinaryLogger:${{ env.ArtifactsDirectoryName }}/test-net6.0.binlog"

- name: Run Unit Tests (.NET 8.0)
run: dotnet test ${{ env.CommonTestArguments }} ${{ matrix.TestArguments}} --framework net8.0 "/Property:Platform=${{ env.BuildPlatform }};Configuration=${{ env.BuildConfiguration }}" "/BinaryLogger:${{ env.ArtifactsDirectoryName }}/test-net8.0.binlog"

- name: Run Unit Tests (.NET 9.0)
run: dotnet test ${{ env.CommonTestArguments }} ${{ matrix.TestArguments}} --framework net9.0 "/Property:Platform=${{ env.BuildPlatform }};Configuration=${{ env.BuildConfiguration }}" "/BinaryLogger:${{ env.ArtifactsDirectoryName }}/test-net9.0.binlog"

- name: Code Coverage Report
if: ${{ matrix.name == 'Linux' }}
uses: irongut/CodeCoverageSummary@v1.3.0
with:
filename: '**/TestResults/**/coverage.cobertura.xml'
badge: true
format: markdown
hide_complexity: true
indicators: true
output: both
thresholds: '60 80'

- name: Add Code Coverage Report to Summary
if: ${{ matrix.name == 'Linux' }}
run: cat code-coverage-results.md >> $GITHUB_STEP_SUMMARY

- name: Upload Test Results
uses: actions/upload-artifact@v4
if: success() || failure()
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/Official.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ jobs:
- name: Install .NET SDKs
uses: actions/setup-dotnet@v4
with:
dotnet-version: 9.x
dotnet-version: 10.x
dotnet-quality: 'preview'

- name: Build Solution
Expand Down
1 change: 1 addition & 0 deletions Directory.Build.props
Original file line number Diff line number Diff line change
Expand Up @@ -8,5 +8,6 @@
<Nullable>enable</Nullable>
<Deterministic>true</Deterministic>
<RestoreUseStaticGraphEvaluation>true</RestoreUseStaticGraphEvaluation>
<SuppressTfmSupportBuildErrors>true</SuppressTfmSupportBuildErrors>
</PropertyGroup>
</Project>
5 changes: 2 additions & 3 deletions Directory.Packages.props
Original file line number Diff line number Diff line change
Expand Up @@ -3,13 +3,12 @@
<ManagePackageVersionsCentrally>true</ManagePackageVersionsCentrally>
</PropertyGroup>
<ItemGroup>
<PackageVersion Include="coverlet.collector" Version="6.0.4" />
<PackageVersion Include="Microsoft.CodeAnalysis.BannedApiAnalyzers" Version="4.14.0" />
<PackageVersion Include="Microsoft.NET.Test.Sdk" Version="17.13.0" />
<PackageVersion Include="Microsoft.NET.Test.Sdk" Version="17.14.1" />
<PackageVersion Include="Moq" Version="4.20.72" />
<PackageVersion Include="Shouldly" Version="4.3.0" />
<PackageVersion Include="xunit" Version="2.9.3" />
<PackageVersion Include="xunit.runner.visualstudio" Version="3.0.2" />
<PackageVersion Include="xunit.runner.visualstudio" Version="3.1.4" />
</ItemGroup>
<ItemGroup>
<GlobalPackageReference Include="Microsoft.Build.Artifacts" Version="6.1.63" />
Expand Down
Original file line number Diff line number Diff line change
@@ -1,10 +1,9 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<TargetFrameworks>net472;net6.0;net8.0;net9.0</TargetFrameworks>
<TargetFrameworks>net472;net8.0;net9.0</TargetFrameworks>
<IsPackable>false</IsPackable>
</PropertyGroup>
<ItemGroup>
<PackageReference Include="coverlet.collector" />
<PackageReference Include="Microsoft.NET.Test.Sdk" />
<PackageReference Include="Shouldly" />
<PackageReference Include="xunit" />
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<TargetFrameworks>netstandard2.0;net6.0;net8.0;net9.0</TargetFrameworks>
<TargetFrameworks>netstandard2.0;net8.0;net9.0</TargetFrameworks>
<Description>Provides implementations of IEnvironmentVariableProvider so that unit tests can mock calls that retrieve environment variable.</Description>
<PackageTags>Environment Variable Abstraction env var test helper</PackageTags>
<ArtifactsPath>$(BaseArtifactsPath)\$(MSBuildProjectName)\</ArtifactsPath>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,10 +1,9 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<TargetFrameworks>net472;net6.0;net8.0;net9.0</TargetFrameworks>
<TargetFrameworks>net472;net8.0;net9.0</TargetFrameworks>
<IsPackable>false</IsPackable>
</PropertyGroup>
<ItemGroup>
<PackageReference Include="coverlet.collector" />
<PackageReference Include="Microsoft.NET.Test.Sdk" />
<PackageReference Include="Moq" />
<PackageReference Include="Shouldly" />
Expand Down
2 changes: 1 addition & 1 deletion src/EnvironmentAbstractions/EnvironmentAbstractions.csproj
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<TargetFrameworks>netstandard2.0;net6.0;net8.0;net9.0</TargetFrameworks>
<TargetFrameworks>netstandard2.0;net8.0;net9.0</TargetFrameworks>
<Description>Provides an abstraction for retrieving environment variable so that these calls can be made to be more testable.</Description>
<PackageTags>Environment Variable Abstraction env var</PackageTags>
<ArtifactsPath>$(BaseArtifactsPath)\$(MSBuildProjectName)\</ArtifactsPath>
Expand Down
Loading