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
27 changes: 17 additions & 10 deletions .github/workflows/build-and-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ env:
GLOBAL_JSON_PATH: './src/global.json'
PROJECT_PATH: './src/WebSocket.Rx.sln'
PACKAGE_OUTPUT_DIRECTORY: './packages'
TEST_OUTPUT_DIRECTORY: './testresults'
TEST_OUTPUT_DIRECTORY: '${{ github.workspace }}/testresults'
COVERAGE_REPORT_DIRECTORY: './coveragereport'

permissions:
Expand All @@ -36,6 +36,8 @@ jobs:
uses: actions/setup-dotnet@v5
with:
global-json-file: ${{ env.GLOBAL_JSON_PATH }}
cache: true
cache-dependency-path: '**/packages.lock.json'

- name: Restore tools
run: dotnet tool restore
Expand Down Expand Up @@ -78,7 +80,11 @@ jobs:
echo "EOF" >> $GITHUB_OUTPUT

- name: Restore dependencies
run: dotnet restore ${{ env.PROJECT_PATH }}
run: >
dotnet
restore
--locked-mode
${{ env.PROJECT_PATH }}

- name: Build
run: >
Expand All @@ -90,15 +96,16 @@ jobs:
/p:ContinuousIntegrationBuild=true

- name: Run tests
working-directory: './src'
run: >
dotnet test
--configuration Release
--no-build
--collect:"XPlat Code Coverage"
--logger trx
--results-directory ${{ env.TEST_OUTPUT_DIRECTORY }}
--verbosity normal
${{ env.PROJECT_PATH }}
--configuration Release
--no-ansi
--no-build
--coverage
--coverage-output-format cobertura
--results-directory ${{ env.TEST_OUTPUT_DIRECTORY }}
--solution *.sln

- name: Create NuGet package
run: >
Expand All @@ -113,7 +120,7 @@ jobs:
- name: Report Code Coverage
uses: danielpalme/ReportGenerator-GitHub-Action@5
with:
reports: '${{ env.TEST_OUTPUT_DIRECTORY }}/*/coverage.cobertura.xml'
reports: '${{ env.TEST_OUTPUT_DIRECTORY }}/*cobertura.xml'
targetdir: '${{ env.COVERAGE_REPORT_DIRECTORY }}'
reporttypes: 'MarkdownSummaryGithub'
tag: '${{ steps.gitversion.outputs.fullSemVer }}'
Expand Down
8 changes: 4 additions & 4 deletions src/WebSocket.Rx.Tests/WebSocket.Rx.Tests.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -5,14 +5,14 @@
<ImplicitUsings>enable</ImplicitUsings>
<Nullable>enable</Nullable>
<IsPackable>false</IsPackable>
<IsTestProject>true</IsTestProject>
<OutputType>Exe</OutputType>
</PropertyGroup>

<ItemGroup>
<PackageReference Include="coverlet.collector" Version="6.0.4"/>
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="18.0.1"/>
<PackageReference Include="Microsoft.Testing.Extensions.CodeCoverage" Version="18.4.1"/>
<PackageReference Include="NSubstitute" Version="5.3.0"/>
<PackageReference Include="xunit.v3" Version="3.2.2"/>
<PackageReference Include="xunit.runner.visualstudio" Version="3.1.5"/>
<PackageReference Include="xunit.v3.mtp-v2" Version="3.2.2"/>
</ItemGroup>

<ItemGroup>
Expand Down
4 changes: 3 additions & 1 deletion src/WebSocket.Rx/WebSocket.Rx.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
<PackageTags>WebSocket;Reactive;</PackageTags>
<PackageIcon>logo.png</PackageIcon>
<PackageReadmeFile>README.md</PackageReadmeFile>
<PackageLicenseFile>LICENSE</PackageLicenseFile>
<PackageLicenseExpression>MIT</PackageLicenseExpression>
<PackageProjectUrl>https://github.com/st0o0/WebSocket.Rx</PackageProjectUrl>
<RepositoryUrl>https://github.com/st0o0/WebSocket.Rx.git</RepositoryUrl>
<RepositoryType>git</RepositoryType>
Expand All @@ -18,6 +18,7 @@
<IsPackable>true</IsPackable>
<ImplicitUsings>true</ImplicitUsings>
<InvariantGlobalization>true</InvariantGlobalization>
<RestorePackagesWithLockFile>true</RestorePackagesWithLockFile>
</PropertyGroup>
<PropertyGroup>
<PublishRepositoryUrl>true</PublishRepositoryUrl>
Expand All @@ -39,6 +40,7 @@
<None Include="../../README.md" Pack="true" Visible="false" PackagePath="\"/>
<None Include="../../LICENSE" Pack="true" Visible="false" PackagePath="\"/>
<None Include="../../docs/logo/logo.png" Visible="false" Pack="true" PackagePath="\"/>
<None Remove="packages.lock.json"/>
</ItemGroup>

</Project>
25 changes: 25 additions & 0 deletions src/WebSocket.Rx/packages.lock.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
{
"version": 1,
"dependencies": {
"net10.0": {
"Microsoft.IO.RecyclableMemoryStream": {
"type": "Direct",
"requested": "[3.0.1, )",
"resolved": "3.0.1",
"contentHash": "s/s20YTVY9r9TPfTrN5g8zPF1YhwxyqO6PxUkrYTGI2B+OGPe9AdajWZrLhFqXIvqIW23fnUE4+ztrUWNU1+9g=="
},
"Microsoft.NET.ILLink.Tasks": {
"type": "Direct",
"requested": "[10.0.3, )",
"resolved": "10.0.3",
"contentHash": "0B6nZyCHWXnvmlB559oduOspVdNOnpNXPjhpWVMovLPAsDVG7A4jJR9rzECf67JUzxP8/ee/wA8clwIzJcWNFA=="
},
"R3": {
"type": "Direct",
"requested": "[1.3.0, )",
"resolved": "1.3.0",
"contentHash": "c4bL37HGimYon/qfRTZOJE41M3cgdMJn/p4O5Jq+WHTJGNXUb1x2DlVI+iZk5phCBwq3ERfrgbaPu9WdG2OS+w=="
}
}
}
}
3 changes: 3 additions & 0 deletions src/global.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,5 +3,8 @@
"version": "10.0.103",
"rollForward": "latestPatch",
"allowPrerelease": false
},
"test": {
"runner": "Microsoft.Testing.Platform"
}
}
Loading