Skip to content

Commit

Permalink
Merge pull request #24 from zone117x/chore/skip-netcoreapp3.1-tests
Browse files Browse the repository at this point in the history
test: skip netcoreapp3.1 and add coverage
  • Loading branch information
viceice authored Jan 5, 2023
2 parents c5d52d9 + 3cc0c5e commit 12923f3
Show file tree
Hide file tree
Showing 5 changed files with 43 additions and 11 deletions.
4 changes: 1 addition & 3 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@ on:

env:
DOTNET_NOLOGO: true
ProjectLoadStyle: All

concurrency:
group: ${{ github.workflow }}-${{ github.event.number || github.ref }}
Expand Down Expand Up @@ -48,9 +47,8 @@ jobs:

- name: Codecov
uses: codecov/codecov-action@v3.1.1
if: always()
with:
files: "**/TestResults/*/*.cobertura.xml"
files: '**/TestResults/*/*.cobertura.xml'

build:
needs: [test]
Expand Down
2 changes: 0 additions & 2 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,12 +5,10 @@ on:
tags:
- v*

# will work nicely with MinVer
# https://github.com/adamralph/minver

env:
DOTNET_NOLOGO: true
ProjectLoadStyle: All

concurrency:
group: ${{ github.workflow }}-${{ github.event.number || github.ref }}
Expand Down
14 changes: 8 additions & 6 deletions Test/Test.csproj
Original file line number Diff line number Diff line change
@@ -1,15 +1,17 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<TargetFrameworks>netcoreapp3.1;net6.0;net48</TargetFrameworks>
<TargetFrameworks Condition="!$([MSBuild]::IsOSPlatform('Windows'))">netcoreapp3.1;net6.0</TargetFrameworks>
<TargetFrameworks>net6.0;net48</TargetFrameworks>
<TargetFrameworks Condition="!$([MSBuild]::IsOSPlatform('Windows'))">net6.0</TargetFrameworks>
<RunSettingsFilePath>$(MSBuildThisFileDirectory)/test.runsettings</RunSettingsFilePath>
</PropertyGroup>

<ItemGroup>
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="16.4.0" />
<PackageReference Include="MSTest.TestAdapter" Version="2.0.0" />
<PackageReference Include="MSTest.TestFramework" Version="2.0.0" />
<PackageReference Include="Newtonsoft.Json" Version="12.0.3" />
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.4.1" />
<PackageReference Include="MSTest.TestAdapter" Version="3.0.2" />
<PackageReference Include="MSTest.TestFramework" Version="3.0.2" />
<PackageReference Include="Newtonsoft.Json" Version="13.0.2" />
</ItemGroup>

<ItemGroup>
<ProjectReference Include="..\MimeMapping.csproj" />
</ItemGroup>
Expand Down
28 changes: 28 additions & 0 deletions Test/test.runsettings
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
<?xml version="1.0" encoding="utf-8" ?>
<RunSettings>
<DataCollectionRunSettings>
<DataCollectors>
<DataCollector friendlyName="Code Coverage" uri="datacollector://Microsoft/CodeCoverage/2.0">
<Configuration>
<Format>Cobertura</Format>
<CodeCoverage>
<ModulePaths>
<Include>
<ModulePath>MimeMapping\.dll$</ModulePath>
</Include>
</ModulePaths>
<Attributes>
<Exclude>
<!-- Don't forget "Attribute" at the end of the name -->
<!--<Attribute>^System\.Diagnostics\.DebuggerHiddenAttribute$</Attribute>
<Attribute>^System\.Diagnostics\.DebuggerNonUserCodeAttribute$</Attribute>-->
<Attribute>^System\.CodeDom\.Compiler\.GeneratedCodeAttribute$</Attribute>
<Attribute>^System\.Diagnostics\.CodeAnalysis\.ExcludeFromCodeCoverageAttribute$</Attribute>
</Exclude>
</Attributes>
</CodeCoverage>
</Configuration>
</DataCollector>
</DataCollectors>
</DataCollectionRunSettings>
</RunSettings>
6 changes: 6 additions & 0 deletions codecov.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
comment: false
codecov:
require_ci_to_pass: false
notify:
after_n_builds: 3
wait_for_ci: true

0 comments on commit 12923f3

Please sign in to comment.