Skip to content

Commit

Permalink
.NET 2.1 testing fix (#1078)
Browse files Browse the repository at this point in the history
  • Loading branch information
laves authored Aug 23, 2023
1 parent 49e8744 commit feb2b57
Show file tree
Hide file tree
Showing 3 changed files with 42 additions and 26 deletions.
10 changes: 5 additions & 5 deletions .github/workflows/dotnet.yml
Original file line number Diff line number Diff line change
Expand Up @@ -58,11 +58,11 @@ jobs:
strategy:
matrix:
os: [ubuntu-latest, macos-latest, windows-latest]
dotnet-version: [2.0.x, 3.0.x, 3.1.x, 5.0.x, 6.0.x]
dotnet-version: [2.1.x, 3.0.x, 3.1.x, 5.0.x, 6.0.x]
include:
- dotnet-version: 2.0.x
- dotnet-version: 2.1.x
binding-framework: netstandard2.0
test-framework: netcoreapp2.0
test-framework: netcoreapp2.1
- dotnet-version: 3.0.x
binding-framework: netcoreapp3.0
test-framework: netcoreapp3.0
Expand All @@ -88,7 +88,7 @@ jobs:
run: dotnet build Porcupine/Porcupine.csproj --framework ${{ matrix.binding-framework }}

- name: Test
run: dotnet test --framework ${{ matrix.test-framework }} -v d
run: dotnet test --framework ${{ matrix.test-framework }} -v n

build-self-hosted:
runs-on: ${{ matrix.machine }}
Expand All @@ -106,4 +106,4 @@ jobs:
run: dotnet build Porcupine/Porcupine.csproj --framework net6.0

- name: Test
run: dotnet test --framework net6.0 -v d
run: dotnet test --framework net6.0 -v n
1 change: 0 additions & 1 deletion binding/dotnet/PorcupineTest/MainTest.cs
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@ specific language governing permissions and limitations under the License.

using Microsoft.VisualStudio.TestTools.UnitTesting;

using Newtonsoft.Json;
using Newtonsoft.Json.Linq;

using Pv;
Expand Down
57 changes: 37 additions & 20 deletions binding/dotnet/PorcupineTest/PorcupineTest.csproj
Original file line number Diff line number Diff line change
@@ -1,25 +1,42 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<TargetFrameworks>net6.0;net5.0;netcoreapp3.1;netcoreapp3.0;netcoreapp2.0;</TargetFrameworks>
<IsPackable>false</IsPackable>
</PropertyGroup>
<PropertyGroup>
<TargetFrameworks>net6.0;net5.0;netcoreapp3.1;netcoreapp3.0;netcoreapp2.1;</TargetFrameworks>
<IsPackable>false</IsPackable>
</PropertyGroup>

<ItemGroup>
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="16.5.0" />
<PackageReference Include="MSTest.TestAdapter" Version="2.1.0" />
<PackageReference Include="MSTest.TestFramework" Version="2.1.0" />
<PackageReference Include="coverlet.collector" Version="1.2.0" />
<PackageReference Include="Newtonsoft.Json" Version="13.0.2" />
</ItemGroup>
<ItemGroup>
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.1.0" />
<PackageReference Include="MSTest.TestAdapter" Version="2.2.8" />
<PackageReference Include="MSTest.TestFramework" Version="2.2.8" />
<PackageReference Include="coverlet.collector" Version="3.1.2" />
<PackageReference Include="Newtonsoft.Json" Version="13.0.2" />
</ItemGroup>

<ItemGroup>
<ProjectReference Include="..\Porcupine\Porcupine.csproj" />
</ItemGroup>
<ItemGroup>
<Content Include="..\..\..\resources\audio_samples\*">
<Link>resources\audio_samples\%(Filename)%(Extension)</Link>
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</Content>
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\Porcupine\Porcupine.csproj" />
</ItemGroup>
<ItemGroup>
<Content Include="..\..\..\resources\audio_samples\*">
<Link>resources\audio_samples\%(Filename)%(Extension)</Link>
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</Content>
</ItemGroup>
<ItemGroup>
<Content Include="..\..\..\lib\windows\amd64\libpv_porcupine.dll">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
<Link>libpv_porcupine.dll</Link>
<Visible>false</Visible>
</Content>
<Content Include="..\..\..\lib\linux\x86_64\libpv_porcupine.so">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
<Link>libpv_porcupine.so</Link>
<Visible>false</Visible>
</Content>
<Content Include="..\..\..\lib\mac\x86_64\libpv_porcupine.dylib">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
<Link>libpv_porcupine.dylib</Link>
<Visible>false</Visible>
</Content>
</ItemGroup>
</Project>

0 comments on commit feb2b57

Please sign in to comment.