diff --git a/.github/actions/setup-dotnet/action.yml b/.github/actions/setup-dotnet/action.yml
index 578499d..88d10eb 100644
--- a/.github/actions/setup-dotnet/action.yml
+++ b/.github/actions/setup-dotnet/action.yml
@@ -15,4 +15,4 @@ runs:
path: ~/.nuget/packages
key: ${{ runner.os }}-nuget-${{ hashFiles('**/*.csproj', 'Directory.Packages.props') }}
restore-keys: |
- ${{ runner.os }}-nuget-
\ No newline at end of file
+ ${{ runner.os }}-nuget-
diff --git a/.github/workflows/dotnet.publish.yml b/.github/workflows/dotnet.publish.yml
index 8f87e5b..81094da 100644
--- a/.github/workflows/dotnet.publish.yml
+++ b/.github/workflows/dotnet.publish.yml
@@ -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"
@@ -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
@@ -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
@@ -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
\ No newline at end of file
+ run: dotnet nuget push nuget/*.nupkg --skip-duplicate -k "$NUGET_API_KEY" -s https://api.nuget.org/v3/index.json
diff --git a/.github/workflows/dotnet.tests.yml b/.github/workflows/dotnet.tests.yml
index 859f3e5..5c2e5ea 100644
--- a/.github/workflows/dotnet.tests.yml
+++ b/.github/workflows/dotnet.tests.yml
@@ -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 }}
@@ -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:
@@ -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
\ No newline at end of file
+ path: |
+ tests/Pool.Tests/coverage.cobertura.xml
+ if-no-files-found: error
diff --git a/Directory.Build.targets b/Directory.Build.targets
new file mode 100644
index 0000000..529af2d
--- /dev/null
+++ b/Directory.Build.targets
@@ -0,0 +1,11 @@
+
+
+
+
+ true
+ $(OutputPath)$(AssemblyName).xml
+
+
+
diff --git a/src/Pool/Pool.csproj b/src/Pool/Pool.csproj
index 4f5f4c4..a251a59 100644
--- a/src/Pool/Pool.csproj
+++ b/src/Pool/Pool.csproj
@@ -2,7 +2,6 @@
MSL.$(AssemblyName)
- true
MSL.Pool — thread-safe async object pool with leasing, bounded concurrency, and metrics
MSL.$(AssemblyName)
Mark Lauter