Skip to content

Commit

Permalink
Merge branch 'master' into dependabot/nuget/MinVer-5.0.0
Browse files Browse the repository at this point in the history
  • Loading branch information
pwelter34 authored May 23, 2024
2 parents 8b8c361 + 37d1a5b commit ce6a560
Show file tree
Hide file tree
Showing 11 changed files with 138 additions and 100 deletions.
66 changes: 54 additions & 12 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
@@ -1,15 +1,57 @@
version: 2
updates:
- package-ecosystem: "github-actions"
directory: "/"
schedule:
interval: daily
time: "01:00"
open-pull-requests-limit: 10
- package-ecosystem: "github-actions"
directory: "/"
schedule:
interval: daily
time: "01:00"
timezone: "America/Chicago"
open-pull-requests-limit: 10

- package-ecosystem: nuget
directory: "/"
schedule:
interval: daily
time: "02:00"
open-pull-requests-limit: 10
- package-ecosystem: nuget
directory: "/"
schedule:
interval: daily
time: "02:00"
timezone: "America/Chicago"
open-pull-requests-limit: 10
groups:
Azure:
patterns:
- "Azure.*"
- "Microsoft.Azure.*"
- "Microsoft.Extensions.Azure"
AspNetCoreHealthChecks:
patterns:
- "AspNetCore.HealthChecks.*"
AspNetCore:
patterns:
- "Microsoft.AspNetCore.*"
- "Microsoft.Extensions.Features"
MicrosoftExtensions:
patterns:
- "Microsoft.Extensions.*"
EntityFrameworkCore:
patterns:
- "Microsoft.EntityFrameworkCore.*"
OpenTelemetry:
patterns:
- "OpenTelemetry.*"
Serilog:
patterns:
- "Serilog"
- "Serilog.*"
Hangfire:
patterns:
- "Hangfire"
- "Hangfire.*"
Testcontainers:
patterns:
- "Testcontainers.*"
xUnit:
patterns:
- "xunit"
- "xunit.assert"
- "xunit.core"
- "xunit.extensibility.*"
- "xunit.runner.*"
119 changes: 58 additions & 61 deletions .github/workflows/dotnet.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ name: Build
env:
DOTNET_NOLOGO: true
DOTNET_SKIP_FIRST_TIME_EXPERIENCE: true
BUILD_PATH: '${{github.workspace}}/artifacts'
BUILD_PATH: "${{github.workspace}}/artifacts"
COVERALLS_REPO_TOKEN: ${{ secrets.COVERALLS_REPO_TOKEN }}

on:
Expand All @@ -12,89 +12,86 @@ on:
- master
- develop
tags:
- 'v*'
- "v*"
pull_request:
branches:
- master
- develop

jobs:

build:
runs-on: ubuntu-latest

steps:
- name: Checkout
uses: actions/checkout@v4
with:
fetch-depth: 0

- name: Install .NET Core
uses: actions/setup-dotnet@v4
with:
- name: Checkout
uses: actions/checkout@v4
with:
fetch-depth: 0

- name: Install .NET
uses: actions/setup-dotnet@v4
with:
dotnet-version: |
6.0.x
7.0.x
8.0.x
- name: Restore Dependencies
run: dotnet restore
6.0.x
7.0.x
8.0.x
- name: Build Solution
run: dotnet build --no-restore --configuration Release
- name: Restore Dependencies
run: dotnet restore

- name: Run Test
run: dotnet test --no-build --configuration Release --collect:"XPlat Code Coverage" --settings coverlet.runsettings
- name: Build Solution
run: dotnet build --no-restore --configuration Release

- name: Run Test
run: dotnet test --no-build --configuration Release --collect:"XPlat Code Coverage" --settings coverlet.runsettings

- name: Report Coverage
if: success()
uses: coverallsapp/github-action@v2
with:
- name: Report Coverage
if: success()
uses: coverallsapp/github-action@v2
with:
file: "${{github.workspace}}/test/*/TestResults/*/coverage.info"
format: lcov

- name: Create Packages
if: success() && github.event_name != 'pull_request'
run: dotnet pack --configuration Release --include-symbols --include-source --no-build --output "${{env.BUILD_PATH}}"
- name: Create Packages
if: success() && github.event_name != 'pull_request'
run: dotnet pack --configuration Release --no-build --output "${{env.BUILD_PATH}}"

- name: Upload Packages
if: success() && github.event_name != 'pull_request'
uses: actions/upload-artifact@v4
with:
name: packages
path: '${{env.BUILD_PATH}}'
- name: Upload Packages
if: success() && github.event_name != 'pull_request'
uses: actions/upload-artifact@v4
with:
name: packages
path: "${{env.BUILD_PATH}}"

deploy:
runs-on: ubuntu-latest
needs: build
if: success() && github.event_name != 'pull_request' && (github.ref == 'refs/heads/master' || startsWith(github.ref, 'refs/tags/v'))

steps:
- name: Download Artifact
uses: actions/download-artifact@v4
with:
name: packages

- name: Publish Packages GitHub
run: |
for package in $(find -name "*.nupkg"); do
echo "${0##*/}": Pushing $package...
dotnet nuget push $package --source https://nuget.pkg.github.com/loresoft/index.json --api-key ${{ secrets.GITHUB_TOKEN }} --skip-duplicate
done
- name: Publish Packages feedz
run: |
for package in $(find -name "*.nupkg"); do
echo "${0##*/}": Pushing $package...
dotnet nuget push $package --source https://f.feedz.io/loresoft/open/nuget/index.json --api-key ${{ secrets.FEEDDZ_KEY }} --skip-duplicate
done
- name: Publish Packages Nuget
if: startsWith(github.ref, 'refs/tags/v')
run: |
for package in $(find -name "*.nupkg"); do
echo "${0##*/}": Pushing $package...
dotnet nuget push $package --source https://api.nuget.org/v3/index.json --api-key ${{ secrets.NUGET_KEY }} --skip-duplicate
done
- name: Download Artifact
uses: actions/download-artifact@v4
with:
name: packages

- name: Publish Packages GitHub
run: |
for package in $(find -name "*.nupkg"); do
echo "${0##*/}": Pushing $package...
dotnet nuget push $package --source https://nuget.pkg.github.com/loresoft/index.json --api-key ${{ secrets.GITHUB_TOKEN }} --skip-duplicate
done
- name: Publish Packages feedz
run: |
for package in $(find -name "*.nupkg"); do
echo "${0##*/}": Pushing $package...
dotnet nuget push $package --source https://f.feedz.io/loresoft/open/nuget/index.json --api-key ${{ secrets.FEEDDZ_KEY }} --skip-duplicate
done
- name: Publish Packages Nuget
if: startsWith(github.ref, 'refs/tags/v')
run: |
for package in $(find -name "*.nupkg"); do
echo "${0##*/}": Pushing $package...
dotnet nuget push $package --source https://api.nuget.org/v3/index.json --api-key ${{ secrets.NUGET_KEY }} --skip-duplicate
done
2 changes: 0 additions & 2 deletions coverlet.runsettings
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,6 @@
<DataCollector friendlyName="XPlat code coverage">
<Configuration>
<Format>lcov</Format>
<ExcludeByAttribute>Obsolete,GeneratedCodeAttribute,CompilerGeneratedAttribute,TestSDKAutoGeneratedCode</ExcludeByAttribute>
<SkipAutoProps>true</SkipAutoProps>
</Configuration>
</DataCollector>
</DataCollectors>
Expand Down
19 changes: 11 additions & 8 deletions src/Directory.Build.props
Original file line number Diff line number Diff line change
Expand Up @@ -16,14 +16,18 @@
<PublishRepositoryUrl>true</PublishRepositoryUrl>
</PropertyGroup>

<PropertyGroup>
<DebugType>portable</DebugType>
<PublishRepositoryUrl>true</PublishRepositoryUrl>
<IncludeSymbols>true</IncludeSymbols>
<SymbolPackageFormat>snupkg</SymbolPackageFormat>
<PropertyGroup Label="Debug">
<DebugType>embedded</DebugType>
<EmbedUntrackedSources>true</EmbedUntrackedSources>
<IncludeSymbols>false</IncludeSymbols>
</PropertyGroup>

<PropertyGroup>
<PropertyGroup Condition="'$(GITHUB_ACTIONS)' == 'true'">
<ContinuousIntegrationBuild>true</ContinuousIntegrationBuild>
</PropertyGroup>

<PropertyGroup Label="Options">
<DefaultLanguage>en-US</DefaultLanguage>
<LangVersion>latest</LangVersion>
<ImplicitUsings>enable</ImplicitUsings>
<NoWarn>1591</NoWarn>
Expand All @@ -32,9 +36,8 @@
<PropertyGroup>
<MinVerTagPrefix>v</MinVerTagPrefix>
</PropertyGroup>

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

Expand Down
2 changes: 1 addition & 1 deletion src/FluentRest.Factory/FluentRest.Factory.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
</ItemGroup>

<ItemGroup>
<PackageReference Include="Microsoft.Extensions.DependencyInjection.Abstractions" Version="8.0.0" />
<PackageReference Include="Microsoft.Extensions.DependencyInjection.Abstractions" Version="8.0.1" />
<PackageReference Include="Microsoft.Extensions.Http" Version="8.0.0" />
</ItemGroup>

Expand Down
5 changes: 2 additions & 3 deletions src/FluentRest.Fake/FluentRest.Fake.csproj
Original file line number Diff line number Diff line change
@@ -1,11 +1,10 @@
<Project Sdk="Microsoft.NET.Sdk">
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<TargetFrameworks>netstandard2.0;netstandard2.1;net6.0;net7.0;net8.0</TargetFrameworks>
</PropertyGroup>

<ItemGroup>
<PackageReference Include="System.Net.Http" Version="4.3.4" />
<PackageReference Include="System.Text.Json" Version="8.0.2" />
<PackageReference Include="System.Text.Json" Version="8.0.3" />
</ItemGroup>

</Project>
5 changes: 2 additions & 3 deletions src/FluentRest/FluentRest.csproj
Original file line number Diff line number Diff line change
@@ -1,11 +1,10 @@
<Project Sdk="Microsoft.NET.Sdk">
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<TargetFrameworks>netstandard2.0;netstandard2.1;net6.0;net7.0;net8.0</TargetFrameworks>
</PropertyGroup>

<ItemGroup>
<PackageReference Include="System.Net.Http" Version="4.3.4" />
<PackageReference Include="System.Text.Json" Version="8.0.2" />
<PackageReference Include="System.Text.Json" Version="8.0.3" />
</ItemGroup>

</Project>
6 changes: 3 additions & 3 deletions test/FluentRest.Factory.Tests/FluentRest.Factory.Tests.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -10,16 +10,16 @@
</ItemGroup>

<ItemGroup>
<PackageReference Include="coverlet.collector" Version="6.0.1">
<PackageReference Include="coverlet.collector" Version="6.0.2">
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
</PackageReference>
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.9.0" />
<PackageReference Include="xunit.runner.visualstudio" Version="2.5.7">
<PackageReference Include="xunit.runner.visualstudio" Version="2.5.8">
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers</IncludeAssets>
</PackageReference>
<PackageReference Include="xunit" Version="2.7.0" />
<PackageReference Include="xunit" Version="2.7.1" />
<PackageReference Include="FluentAssertions" Version="6.12.0" />
<PackageReference Include="Microsoft.Extensions.DependencyInjection" Version="8.0.0" />
</ItemGroup>
Expand Down
6 changes: 3 additions & 3 deletions test/FluentRest.Fake.Tests/FluentRest.Fake.Tests.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -11,16 +11,16 @@
</ItemGroup>

<ItemGroup>
<PackageReference Include="coverlet.collector" Version="6.0.1">
<PackageReference Include="coverlet.collector" Version="6.0.2">
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
</PackageReference>
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.9.0" />
<PackageReference Include="xunit.runner.visualstudio" Version="2.5.7">
<PackageReference Include="xunit.runner.visualstudio" Version="2.5.8">
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers</IncludeAssets>
</PackageReference>
<PackageReference Include="xunit" Version="2.7.0" />
<PackageReference Include="xunit" Version="2.7.1" />
<PackageReference Include="FluentAssertions" Version="6.12.0" />
<PackageReference Include="Microsoft.Extensions.DependencyInjection" Version="8.0.0" />
<PackageReference Include="Microsoft.Extensions.Http" Version="8.0.0" />
Expand Down
6 changes: 3 additions & 3 deletions test/FluentRest.Tests/FluentRest.Tests.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -7,18 +7,18 @@
<ProjectReference Include="..\..\src\FluentRest\FluentRest.csproj" />
</ItemGroup>
<ItemGroup>
<PackageReference Include="coverlet.collector" Version="6.0.1">
<PackageReference Include="coverlet.collector" Version="6.0.2">
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
</PackageReference>
<PackageReference Include="Microsoft.Extensions.DependencyInjection" Version="8.0.0" />
<PackageReference Include="Microsoft.Extensions.Http" Version="8.0.0" />
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.9.0" />
<PackageReference Include="xunit.runner.visualstudio" Version="2.5.7">
<PackageReference Include="xunit.runner.visualstudio" Version="2.5.8">
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers</IncludeAssets>
</PackageReference>
<PackageReference Include="xunit" Version="2.7.0" />
<PackageReference Include="xunit" Version="2.7.1" />
<PackageReference Include="FluentAssertions" Version="6.12.0" />
</ItemGroup>
</Project>
2 changes: 1 addition & 1 deletion test/FluentRest.Tests/GitHub/Models/Issue.cs
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ public class Issue
public string HtmlUrl { get; set; }

[JsonPropertyName("id")]
public int Id { get; set; }
public long Id { get; set; }

[JsonPropertyName("number")]
public int Number { get; set; }
Expand Down

0 comments on commit ce6a560

Please sign in to comment.