Skip to content

Commit

Permalink
Update to dotnet6 on build
Browse files Browse the repository at this point in the history
* Use netstandard2.0 BuildTasks for SIL.LCModel
* Gather test assemblies and pass to nunit3-console
  • Loading branch information
jasonleenaylor committed Jul 12, 2022
1 parent 0250249 commit bae1b9e
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 5 deletions.
9 changes: 7 additions & 2 deletions .github/workflows/ci-cd.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,8 @@ jobs:
matrix:
os: [windows-latest, ubuntu-latest]
runs-on: ${{ matrix.os }}
env:
DOTNET_NOLOGO: true

steps:
- name: Checkout
Expand All @@ -26,7 +28,7 @@ jobs:
- name: Install .NET Core
uses: actions/setup-dotnet@v1
with:
dotnet-version: 5.0.x
dotnet-version: 6.0.x

- name: Build
run: dotnet build
Expand All @@ -35,4 +37,7 @@ jobs:
run: nuget install NUnit.ConsoleRunner -Version 3.13.0 -DirectDownload -OutputDirectory .

- name: Run UnitTests
run: ./NUnit.ConsoleRunner.3.13.0/tools/nunit3-console.exe **/*Tests.dll
run: |
find artifacts/ -type f -name '*Tests.dll' | paste -sd ' '
echo "TESTASSEMBLIES=$(find artifacts/ -type f -name '*Tests.dll' | paste -sd ' ')" >> $GITHUB_ENV
./NUnit.ConsoleRunner.3.13.0/tools/nunit3-console.exe ${{ env.TESTASSEMBLIES }}
2 changes: 1 addition & 1 deletion src/SIL.LCModel/GenerateModel.proj
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="utf-8"?>
<Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003" ToolsVersion="14.0" DefaultTargets="GenerateModel">
<UsingTask TaskName="LcmGenerate" AssemblyFile="$(OutDir)SIL.LCModel.Build.Tasks.dll" />
<UsingTask TaskName="LcmGenerate" AssemblyFile="$(OutDir)..\netstandard2.0\SIL.LCModel.Build.Tasks.dll" />

<Target Name="GenerateModel">
<LcmGenerate XmlFile="MasterLCModel.xml" OutputDir="." OutputFile="DomainImpl/GeneratedClasses.cs" TemplateFile="LcmGenerate/main.vm.cs" />
Expand Down
3 changes: 1 addition & 2 deletions tests/SIL.LCModel.Utils.Tests/SIL.LCModel.Utils.Tests.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,7 @@ This package provides unit tests for SIL.LCModel.Utils and test utility classes<
<PackageReference Include="Mono.Posix.NETStandard" Version="1.0.0" />
</ItemGroup>
<ItemGroup Condition="'$(TargetFramework)' == 'net461'">
<PackageReference Include="Mono.Posix" Version="5.4.0.201" PrivateAssets="All" Condition="'$(OS)' == 'Windows_NT'" />
<Reference Include="Mono.Posix" Condition="'$(OS)' != 'Windows_NT'" />
<PackageReference Include="Mono.Posix" Version="5.4.0.201" PrivateAssets="All" />
</ItemGroup>

<ItemGroup>
Expand Down

0 comments on commit bae1b9e

Please sign in to comment.