Skip to content

Commit

Permalink
Merge pull request #20 from BenjaminAbt/feature/fix-dependencies
Browse files Browse the repository at this point in the history
add dependency updates
  • Loading branch information
BenjaminAbt authored Nov 3, 2024
2 parents 20863d3 + fbde8dd commit 08ad173
Show file tree
Hide file tree
Showing 5 changed files with 77 additions and 58 deletions.
34 changes: 27 additions & 7 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,11 @@ on:
branches:
- main

permissions:
contents: read
actions: read
checks: write

env:
BuildConfig: Release
DOTNET_SKIP_FIRST_TIME_EXPERIENCE: true
Expand All @@ -19,34 +24,49 @@ jobs:

- name: Cancel previous builds in PR
uses: styfle/[email protected]
with:
access_token: ${{ github.token }}

- name: 'Checkout Code'
- name: Checkout code
uses: actions/checkout@v4
with:
fetch-depth: 0 # avoid shallow clone so nbgv can do its work.

- name: 'Install .NET SDK'
- name: Setup .NET SDK
uses: actions/setup-dotnet@v4
with:
global-json-file: ./global.json
#dotnet-version: '9.x'
#dotnet-quality: 'preview'

- name: Versioning
- name: Restore dependencies
run: dotnet restore

- name: Setup Git Versioning
uses: dotnet/nbgv@master
id: nbgv

- name: Version Info
- name: Show Version Info
run: |
echo 'SemVer2: ${{ steps.nbgv.outputs.SemVer2 }}'
- name: Build with dotnet
run: dotnet build
--configuration ${{ env.BuildConfig }}
--no-restore --configuration ${{ env.BuildConfig }}
/p:Version=${{ steps.nbgv.outputs.AssemblyVersion }}

- name: Test with dotnet
run: dotnet test
--no-build --configuration ${{ env.BuildConfig }}
--logger "trx;LogFileName=test-results.trx" --results-directory ./artifacts/testResults
continue-on-error: true

- name: Test Report
uses: dorny/test-reporter@v1
if: always()
with:
name: DotNET Tests
path: "./artifacts/testResults/test-results.trx"
reporter: dotnet-trx
fail-on-error: true

- name: Pack NuGet
run: dotnet pack
Expand Down
92 changes: 44 additions & 48 deletions Directory.Packages.props
Original file line number Diff line number Diff line change
@@ -1,50 +1,46 @@
<Project>
<PropertyGroup>
<ManagePackageVersionsCentrally>true</ManagePackageVersionsCentrally>
</PropertyGroup>

<ItemGroup Label=".NET">
<PackageVersion Include="System.Text.Json" Version="7.0.0" />
<PackageVersion Include="Microsoft.EntityFrameworkCore" Version="7.0.0" />
<PackageVersion Include="FluentValidation" Version="11.9.0" />
</ItemGroup>

<ItemGroup Label="Analyzers">
<PackageVersion Include="Roslynator.Analyzers" Version="4.3.0">
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers</IncludeAssets>
</PackageVersion>
<PackageVersion Include="Microsoft.CodeAnalysis.Common" Version="4.5.0" />
<PackageVersion Include="Microsoft.CodeAnalysis.CSharp" Version="4.5.0" />
<PackageVersion Include="Meziantou.Analyzer" Version="2.0.149">
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers</IncludeAssets>
</PackageVersion>
</ItemGroup>

<ItemGroup Label="DevOps">
<PackageVersion Include="Nerdbank.GitVersioning" Version="3.6.133">
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers</IncludeAssets>
</PackageVersion>
</ItemGroup>

<ItemGroup Label="Tests">
<PackageVersion Include="BenchmarkDotNet" Version="0.13.10" />
<PackageVersion Include="Microsoft.NET.Test.Sdk" Version="17.8.0" />
<PackageVersion Include="xunit" Version="2.6.3" />
<PackageVersion Include="xunit.runner.console" Version="2.6.3">
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
</PackageVersion>
<PackageVersion Include="xunit.runner.visualstudio" Version="2.5.5">
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
</PackageVersion>
<PackageVersion Include="coverlet.msbuild" Version="6.0.0">
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers</IncludeAssets>
</PackageVersion>
<PackageVersion Include="NSubstitute" Version="5.0.0" />
</ItemGroup>
<PropertyGroup>
<ManagePackageVersionsCentrally>true</ManagePackageVersionsCentrally>
</PropertyGroup>
<ItemGroup Label=".NET">
<PackageVersion Include="System.Text.Json" Version="8.0.5" />
<PackageVersion Include="Microsoft.EntityFrameworkCore" Version="7.0.0" />
<PackageVersion Include="FluentValidation" Version="11.9.0" />
</ItemGroup>
<ItemGroup Label="Analyzers">
<PackageVersion Include="Roslynator.Analyzers" Version="4.3.0">
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers</IncludeAssets>
</PackageVersion>
<PackageVersion Include="Microsoft.CodeAnalysis.Common" Version="4.5.0" />
<PackageVersion Include="Microsoft.CodeAnalysis.CSharp" Version="4.5.0" />
<PackageVersion Include="Meziantou.Analyzer" Version="2.0.177">
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers</IncludeAssets>
</PackageVersion>
</ItemGroup>
<ItemGroup Label="DevOps">
<PackageVersion Include="Nerdbank.GitVersioning" Version="3.6.133">
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers</IncludeAssets>
</PackageVersion>
</ItemGroup>
<ItemGroup Label="Tests">
<PackageVersion Include="BenchmarkDotNet" Version="0.13.10" />
<PackageVersion Include="Microsoft.NET.Test.Sdk" Version="17.11.1" />
<PackageVersion Include="xunit" Version="2.9.2" />
<PackageVersion Include="xunit.runner.console" Version="2.9.2">
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
</PackageVersion>
<PackageVersion Include="xunit.runner.visualstudio" Version="2.8.2">
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
</PackageVersion>
<PackageVersion Include="coverlet.msbuild" Version="6.0.2">
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers</IncludeAssets>
</PackageVersion>
<PackageVersion Include="NSubstitute" Version="5.0.0" />
</ItemGroup>
</Project>
2 changes: 1 addition & 1 deletion global.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"sdk": {
"version": "9.0.100-preview.3.24204.13"
"version": "9.0.100-rc.2.24474.11"
}
}
5 changes: 4 additions & 1 deletion tests/StrongOf.UnitTests/StrongOf.UnitTests.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,10 @@
</PropertyGroup>

<ItemGroup>
<PackageReference Include="coverlet.msbuild" />
<PackageReference Include="coverlet.msbuild">
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
</PackageReference>
<PackageReference Include="Microsoft.NET.Test.Sdk" />
<PackageReference Include="xunit" />
<PackageReference Include="xunit.runner.console">
Expand Down
2 changes: 1 addition & 1 deletion tests/StrongOf.UnitTests/StrongString_Methods_Tests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -116,7 +116,7 @@ public void ContainsInvalidCharsTests(bool expected, string invalidCharsExpected
Assert.NotEmpty(invalidCharsExpected);
HashSet<char> invalidCharsExpectedSet = new(invalidCharsExpected.ToCharArray());

Assert.Equal(invalidCharsExpectedSet, invalidChars);
Assert.Equal(invalidCharsExpectedSet.ToList(), invalidChars);
}
else
{
Expand Down

0 comments on commit 08ad173

Please sign in to comment.