Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: SwissLife-OSS/snapshooter
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: 0.13.0
Choose a base ref
...
head repository: SwissLife-OSS/snapshooter
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: 0.14.0
Choose a head ref
  • 2 commits
  • 14 files changed
  • 2 contributors

Commits on Jan 3, 2024

  1. Add Github Pipelines (#189)

    * Add Github Pipelines
    
    * update sonar scanner
    RohrerF authored Jan 3, 2024

    Verified

    This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
    Copy the full SHA
    4d6e71f View commit details

Commits on Jan 5, 2024

  1. Add support for .NET 8, NUnit 4.0 (#188)

    * Added support for .NET 8, Nuget 4.0
    
    * Fixes after peer review
    
    * Fix netandard2.0 using earlier versions of NUnit
    
    * add dotnet 8 to pipelines
    
    * remove unnecessary changes
    
    ---------
    
    Co-authored-by: Florian Rohrer <dev@florianrohrer.ch>
    daghsentinel and RohrerF authored Jan 5, 2024
    Copy the full SHA
    4fce39a View commit details
2 changes: 1 addition & 1 deletion .config/dotnet-tools.json
Original file line number Diff line number Diff line change
@@ -3,7 +3,7 @@
"isRoot": true,
"tools": {
"dotnet-sonarscanner": {
"version": "4.10.0",
"version": "5.15.0",
"commands": [
"dotnet-sonarscanner"
]
30 changes: 30 additions & 0 deletions .github/workflows/pull-request.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
name: Pull Request

on:
pull_request:
branches: ['master']

jobs:
tests:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v2
- name: Setup .NET
uses: actions/setup-dotnet@v3
with:
dotnet-version: |
6
7
8
- name: Build, Test and Sonar
uses: swisslife-oss/actions/pull-request@main
with:
sonar_token: ${{ secrets.SONAR_TOKEN }}
sonar_project_key: 'SwissLife-OSS_Snapshooter'
sonar_project_name: 'snapshooter'
pr_number: ${{ github.event.pull_request.number }}
pr_source_branch: ${{ github.head_ref }}
pr_target_branch: ${{ github.base_ref }}
github_repository: ${{ github.repository }}
sonar_exclusions: ${{ vars.SONAR_EXCLUSIONS }}
45 changes: 45 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
name: Release

on:
push:
tags:
- "*"

jobs:
release:
runs-on: ubuntu-latest

steps:
- name: Checkout code
uses: actions/checkout@v2
- name: Use .NET SDK from global.json
uses: actions/setup-dotnet@v3
- name: Build, Test and Push
uses: swisslife-oss/actions/release-packages@main
with:
tag: ${{ github.ref_name }}
nuget_api_key: ${{ secrets.NUGET_API_KEY }}
enable_push: 'yes'

sonar:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v2
- name: Setup .NET
uses: actions/setup-dotnet@v3
with:
dotnet-version: |
6
7
8
- name: Restore tools
run: dotnet tool restore
- name: Build, Test and Sonar
uses: swisslife-oss/actions/release-sonar@main
with:
tag: ${{ github.ref_name }}
sonar_token: ${{ secrets.SONAR_TOKEN }}
sonar_project_key: 'SwissLife-OSS_Snapshooter'
sonar_project_name: 'snapshooter'
sonar_exclusions: ${{ vars.SONAR_EXCLUSIONS }}
Original file line number Diff line number Diff line change
@@ -2,15 +2,15 @@

<PropertyGroup>
<OutputType>Exe</OutputType>
<TargetFramework>net6.0</TargetFramework>
<TargetFramework>net8.0</TargetFramework>
<ImplicitUsings>enable</ImplicitUsings>
<Nullable>enable</Nullable>
<IsPackable>false</IsPackable>
<Optimize>true</Optimize>
</PropertyGroup>

<ItemGroup>
<PackageReference Include="BenchmarkDotNet" Version="0.13.2" />
<PackageReference Include="BenchmarkDotNet" Version="0.13.10" />
</ItemGroup>

</Project>
2 changes: 1 addition & 1 deletion global.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"sdk": {
"version": "7.0.100",
"version": "8.0.100",
"rollForward": "latestMinor"
}
}
2 changes: 1 addition & 1 deletion src/Dependencies.props
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<Project>
<PropertyGroup Label="Framework Versions">
<ResourceProjectTargetFrameworks>netstandard2.0;netcoreapp3.1;net6.0;net7.0</ResourceProjectTargetFrameworks>
<ResourceProjectTargetFrameworks>netstandard2.0;net6.0;net7.0;net8.0</ResourceProjectTargetFrameworks>
</PropertyGroup>
</Project>
2 changes: 1 addition & 1 deletion src/Package.props
Original file line number Diff line number Diff line change
@@ -26,7 +26,7 @@
</PropertyGroup>

<ItemGroup>
<PackageReference Include="Microsoft.SourceLink.GitHub" Version="1.1.1" PrivateAssets="All"/>
<PackageReference Include="Microsoft.SourceLink.GitHub" Version="8.0.0" PrivateAssets="All"/>
</ItemGroup>

</Project>
9 changes: 8 additions & 1 deletion src/Snapshooter.NUnit/Snapshooter.NUnit.csproj
Original file line number Diff line number Diff line change
@@ -12,9 +12,16 @@
<IsTestProject>false</IsTestProject>
</PropertyGroup>

<ItemGroup Condition=" '$(TargetFramework)' == 'netstandard2.0' ">
<PackageReference Include="NUnit" Version="3.14.0" />
</ItemGroup>

<ItemGroup Condition=" '$(TargetFramework)' != 'netstandard2.0' ">
<PackageReference Include="NUnit" Version="4.0.1" />
</ItemGroup>

<ItemGroup>
<PackageReference Include="Microsoft.CSharp" Version="4.7.0" />
<PackageReference Include="NUnit" Version="3.13.3" />
</ItemGroup>

<ItemGroup>
2 changes: 1 addition & 1 deletion src/Snapshooter/Snapshooter.csproj
Original file line number Diff line number Diff line change
@@ -14,7 +14,7 @@
</PropertyGroup>

<ItemGroup>
<PackageReference Include="Newtonsoft.Json" Version="13.0.1" />
<PackageReference Include="Newtonsoft.Json" Version="13.0.3" />
</ItemGroup>

</Project>
2 changes: 1 addition & 1 deletion test/Dependencies.props
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<Project>
<PropertyGroup Label="Framework Versions">
<TestProjectTargetFrameworks>netcoreapp3.1;net6.0;net7.0</TestProjectTargetFrameworks>
<TestProjectTargetFrameworks>net6.0;net7.0;net8.0</TestProjectTargetFrameworks>
</PropertyGroup>
</Project>
4 changes: 2 additions & 2 deletions test/Snapshooter.MSTest.Tests/Snapshooter.MSTest.Tests.csproj
Original file line number Diff line number Diff line change
@@ -8,8 +8,8 @@
</PropertyGroup>

<ItemGroup>
<PackageReference Include="MSTest.TestAdapter" Version="2.2.10" />
<PackageReference Include="MSTest.TestFramework" Version="2.2.10" />
<PackageReference Include="MSTest.TestAdapter" Version="3.1.1" />
<PackageReference Include="MSTest.TestFramework" Version="3.1.1" />
</ItemGroup>

<ItemGroup>
2 changes: 1 addition & 1 deletion test/Snapshooter.NUnit.Tests/NUnitAssertTests.cs
Original file line number Diff line number Diff line change
@@ -28,4 +28,4 @@ public void Assert_AssertUnequalText_ThrowsEqualException()
Assert.That(action, Throws.TypeOf<AssertionException>());
}
}
}
}
11 changes: 9 additions & 2 deletions test/Snapshooter.NUnit.Tests/Snapshooter.NUnit.Tests.csproj
Original file line number Diff line number Diff line change
@@ -7,9 +7,16 @@
<IsTestProject>true</IsTestProject>
</PropertyGroup>

<ItemGroup Condition=" '$(TargetFramework)' == 'netstandard2.0' ">
<PackageReference Include="NUnit" Version="3.14.0" />
</ItemGroup>

<ItemGroup Condition=" '$(TargetFramework)' != 'netstandard2.0' ">
<PackageReference Include="NUnit" Version="4.0.1" />
</ItemGroup>

<ItemGroup>
<PackageReference Include="nunit" Version="3.13.3" />
<PackageReference Include="NUnit3TestAdapter" Version="4.2.1" />
<PackageReference Include="NUnit3TestAdapter" Version="4.5.0" />
</ItemGroup>

<ItemGroup>
6 changes: 3 additions & 3 deletions test/Snapshooter.NUnit.Tests/SnapshotTests.cs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
using System.IO;
using System.IO;
using NUnit.Framework;
using Snapshooter.Tests.Data;

@@ -61,7 +61,7 @@ public void Match_TestMatchNewSingleSnapshot_ExpectedSnapshotHasBeenCreated()
Snapshot.Match(testPerson);

// assert
Assert.True(File.Exists(snapshotFileName));
Assert.That(File.Exists(snapshotFileName));
}

[TestCase(36, 189.45)]
@@ -129,7 +129,7 @@ public void Match_TestCaseMatchNewSingleSnapshot_ExpectedSnapshotHasBeenCreated(
Snapshot.Match(testPerson);

// assert
Assert.True(File.Exists(snapshotFileName));
Assert.That(File.Exists(snapshotFileName));
}

#endregion