Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/actions/setup-dotnet/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,4 +15,4 @@ runs:
path: ~/.nuget/packages
key: ${{ runner.os }}-nuget-${{ hashFiles('**/*.csproj', 'Directory.Packages.props') }}
restore-keys: |
${{ runner.os }}-nuget-
${{ runner.os }}-nuget-
14 changes: 7 additions & 7 deletions .github/workflows/dotnet.publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ on:
workflow_dispatch:
inputs:
version:
description: "Version to pack for a dry run (build/test/pack/upload only no nuget push)"
description: "Version to pack for a dry run (build/test/pack/upload only no nuget push)"
required: false
default: "0.0.0-dryrun"

Expand All @@ -25,13 +25,13 @@ jobs:
- uses: ./.github/actions/setup-dotnet

- name: Restore dependencies
run: dotnet restore "Pool.slnx"
run: dotnet restore

- name: Build
run: dotnet build "Pool.slnx" -c Release --no-restore
run: dotnet build -c Release --no-restore

- name: Test
run: dotnet test "Pool.slnx" -c Release --no-build
run: dotnet test -c Release --no-build

publish:
needs: test
Expand All @@ -55,10 +55,10 @@ jobs:
echo "PACKAGE_VERSION=$version" >> "$GITHUB_ENV"

- name: Restore
run: dotnet restore src/Pool/Pool.csproj
run: dotnet restore

- name: Pack
run: dotnet pack src/Pool/Pool.csproj -c Release --no-restore -o nuget -p:PackageVersion=$PACKAGE_VERSION -p:Version=$PACKAGE_VERSION
run: dotnet pack Pool.slnx -c Release --no-restore -o nuget -p:PackageVersion=$PACKAGE_VERSION -p:Version=$PACKAGE_VERSION

- name: Upload package artifacts
uses: actions/upload-artifact@v7
Expand All @@ -71,4 +71,4 @@ jobs:
if: github.event_name == 'release'
env:
NUGET_API_KEY: ${{ secrets.NUGET_API_KEY }}
run: dotnet nuget push nuget/*.nupkg --skip-duplicate -k "$NUGET_API_KEY" -s https://api.nuget.org/v3/index.json
run: dotnet nuget push nuget/*.nupkg --skip-duplicate -k "$NUGET_API_KEY" -s https://api.nuget.org/v3/index.json
28 changes: 16 additions & 12 deletions .github/workflows/dotnet.tests.yml
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
name: .NET Test
name: .NET Tests

on:
push:
branches: [ "main" ]
paths: [ "src/**", "tests/**", "samples/**", "Directory.Build.props", "Directory.Packages.props", ".editorconfig", "global.json", ".github/workflows/dotnet.tests.yml", ".github/actions/setup-dotnet/action.yml" ]
paths: [ "src/**", "tests/**", "samples/**", "Directory.Build.props", "Directory.Build.targets", "Directory.Packages.props", ".editorconfig", ".gitattributes", "global.json", ".github/workflows/dotnet.tests.yml", ".github/actions/setup-dotnet/action.yml" ]
pull_request:
branches: [ "main" ]
paths: [ "src/**", "tests/**", "samples/**", "Directory.Build.props", "Directory.Packages.props", ".editorconfig", "global.json", ".github/workflows/dotnet.tests.yml", ".github/actions/setup-dotnet/action.yml" ]
paths: [ "src/**", "tests/**", "samples/**", "Directory.Build.props", "Directory.Build.targets", "Directory.Packages.props", ".editorconfig", ".gitattributes", "global.json", ".github/workflows/dotnet.tests.yml", ".github/actions/setup-dotnet/action.yml" ]

concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
Expand All @@ -25,7 +25,7 @@ jobs:
- name: Verify formatting
run: dotnet format "Pool.slnx" --severity info --verify-no-changes

tests:
test:
runs-on: ubuntu-latest
strategy:
matrix:
Expand All @@ -34,20 +34,24 @@ jobs:
- uses: actions/checkout@v7
- uses: ./.github/actions/setup-dotnet

# Tests Pool.slnx � the library, its unit tests, and the Smtp.Pool sample (built, not tested).
# The Smtp.Pool test projects live under samples/ (samples/Smtp.Pool.slnx) and are intentionally
# excluded from CI: the integration suite needs Docker and is run locally against the sample,
# not as a library CI gate.
# Builds Pool.slnx — the library, its unit tests, and the Smtp.Pool sample (built, not tested).
# The Smtp.Pool test projects live under samples/Smtp.Pool.slnx and are intentionally excluded
# from CI: the integration suite needs Docker and is run locally against the sample, not as a
# library CI gate.
- name: Restore dependencies
run: dotnet restore

- name: Build
run: dotnet build "Pool.slnx" -c ${{ matrix.configuration }}
run: dotnet build -c ${{ matrix.configuration }} --no-restore

- name: Test
run: dotnet test "Pool.slnx" -c ${{ matrix.configuration }} --no-build
run: dotnet test -c ${{ matrix.configuration }} --no-build

- name: Upload coverage report
if: always() && matrix.configuration == 'Debug'
uses: actions/upload-artifact@v7
with:
name: coverage-cobertura
path: tests/**/coverage.cobertura.xml
if-no-files-found: error
path: |
tests/Pool.Tests/coverage.cobertura.xml
if-no-files-found: error
11 changes: 11 additions & 0 deletions Directory.Build.targets
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
<Project>

<!-- Documentation generation is opt-in via IsPackable. Projects that ship as NuGet packages set
<IsPackable>true</IsPackable> and pick up doc-gen. In-solution libraries, samples, and apps set
<IsPackable>false</IsPackable> and skip the ceremony; executables (OutputType=Exe) are excluded outright. -->
<PropertyGroup Condition="'$(IsTestProject)' != 'true' and '$(OutputType)' != 'Exe' and '$(IsPackable)' != 'false'">
<GenerateDocumentationFile>true</GenerateDocumentationFile>
<DocumentationFile>$(OutputPath)$(AssemblyName).xml</DocumentationFile>
</PropertyGroup>

</Project>
1 change: 0 additions & 1 deletion src/Pool/Pool.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@

<PropertyGroup>
<PackageId>MSL.$(AssemblyName)</PackageId>
<GenerateDocumentationFile>true</GenerateDocumentationFile>
<Title>MSL.Pool — thread-safe async object pool with leasing, bounded concurrency, and metrics</Title>
<ProductName>MSL.$(AssemblyName)</ProductName>
<Authors>Mark Lauter</Authors>
Expand Down