Skip to content

Commit

Permalink
Merge pull request #492 from S7NetPlus/testing
Browse files Browse the repository at this point in the history
Fix GH actions test runs
  • Loading branch information
mycroes authored Jul 23, 2023
2 parents e869d19 + aa15145 commit 670fb70
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 12 deletions.
15 changes: 7 additions & 8 deletions .github/workflows/dotnet.yml
Original file line number Diff line number Diff line change
Expand Up @@ -71,14 +71,14 @@ jobs:
artifacts: ${{ github.workspace }}/artifacts
strategy:
matrix:
os: [windows-latest, ubuntu-22.04, macos-latest]
os: [windows-latest, ubuntu-20.04, macos-latest]
test-framework: [net6.0, net7.0]
include:
- os: ubuntu-22.04
- os: ubuntu-20.04
test-framework: net6.0
installSnap7: true
dotnet-sdk: '6.x'
- os: ubuntu-22.04
- os: ubuntu-20.04
test-framework: net7.0
installSnap7: true
dotnet-sdk: '7.x'
Expand Down Expand Up @@ -119,7 +119,9 @@ jobs:
- name: Setup Dotnet
uses: actions/setup-dotnet@v1
with:
dotnet-version: ${{ matrix.dotnet-sdk }}
dotnet-version: |
${{ matrix.dotnet-sdk }}
7.x
- name: Nuget Cache
uses: actions/cache@v2
Expand All @@ -129,12 +131,9 @@ jobs:
key: ${{ runner.os }}-${{ matrix.test-framework }}-nuget-${{ hashFiles('**/packages.lock.json') }}
restore-keys: |
${{ runner.os }}-${{ matrix.test-framework }}-nuget
- name: Restore
run: dotnet restore S7.Net.UnitTest
- name: Test
run: dotnet test --no-restore --nologo --verbosity normal --logger GitHubActions --framework ${{ matrix.test-framework }}
run: dotnet test --nologo --verbosity normal --logger GitHubActions --framework ${{ matrix.test-framework }}

deploy:
# Publish only when creating a GitHub Release
Expand Down
2 changes: 1 addition & 1 deletion S7.Net.UnitTest/S7.Net.UnitTest.csproj
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<TargetFrameworks>net452;netcoreapp3.1;net5.0</TargetFrameworks>
<TargetFrameworks>net462;net6.0;net7.0</TargetFrameworks>

<SignAssembly>true</SignAssembly>
<AssemblyOriginatorKeyFile>Properties\S7.Net.snk</AssemblyOriginatorKeyFile>
Expand Down
6 changes: 3 additions & 3 deletions S7.Net/S7.Net.csproj
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<TargetFrameworks>net452;netstandard2.0;netstandard1.3;net5.0</TargetFrameworks>
<TargetFrameworks>net452;net462;netstandard2.0;netstandard1.3;net5.0;net6.0;net7.0</TargetFrameworks>
<SignAssembly>true</SignAssembly>
<AssemblyOriginatorKeyFile>Properties\S7.Net.snk</AssemblyOriginatorKeyFile>
<InternalsVisibleTo>S7.Net.UnitTest</InternalsVisibleTo>
Expand All @@ -23,11 +23,11 @@
<GenerateDocumentationFile>true</GenerateDocumentationFile>
</PropertyGroup>

<PropertyGroup Condition="'$(TargetFramework)' == 'net452' Or '$(TargetFramework)' == 'netstandard2.0' ">
<PropertyGroup Condition="'$(TargetFramework)' == 'net452' Or '$(TargetFramework)' == 'net462' Or '$(TargetFramework)' == 'netstandard2.0' ">
<DefineConstants>NET_FULL</DefineConstants>
</PropertyGroup>

<ItemGroup Condition="'$(TargetFramework)' != 'net5.0'">
<ItemGroup Condition="'$(TargetFramework)' != 'net5.0' And '$(TargetFramework)' != 'net6.0' And '$(TargetFramework)' != 'net7.0'">
<PackageReference Include="System.Memory" Version="4.5.5" />
</ItemGroup>

Expand Down

0 comments on commit 670fb70

Please sign in to comment.