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
28 changes: 18 additions & 10 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,14 @@ on:
ship_run_id:
description: ID of the GitHub workflow run to ship
required: true
skip_npm:
description: Skip publishing NPM packages
type: boolean
default: false
skip_nuget:
description: Skip publishing NuGet packages
type: boolean
default: false

run-name: ${{ github.ref_name }}

Expand All @@ -24,14 +32,6 @@ jobs:
with:
fetch-depth: 1

- name: ⚙️ Initialization
shell: pwsh
run: |
if ('${{ secrets.NPM_API_KEY }}') {
Write-Host "NPM_API_KEY secret detected. NPM packages will be pushed."
echo "NPM_API_KEY_DEFINED=true" >> $env:GITHUB_ENV
}

- name: 🔎 Search for build of ${{ github.ref }}
shell: pwsh
id: findrunid
Expand Down Expand Up @@ -120,7 +120,15 @@ jobs:
with:
user: ${{ secrets.NUGET_USER }}

- name: 🟢 Setup Node.js
uses: actions/setup-node@v7
with:
node-version: 24
registry-url: https://registry.npmjs.org
package-manager-cache: false # never use caching in release builds

- name: 🚀 Push NPM packages
if: ${{ !inputs.skip_npm }}
shell: pwsh
run: |
$tgz = (Get-ChildItem ./deployables/npm/*.tgz)[0].FullName
Expand All @@ -130,10 +138,10 @@ jobs:
npm set //registry.npmjs.org/:_authToken=${{ secrets.NPM_API_KEY }}
npm publish
working-directory: ${{ runner.temp }}
if: ${{ env.NPM_API_KEY_DEFINED == 'true' }}

- name: 🚀 Push NuGet packages
run: dotnet nuget push ${{ runner.temp }}/deployables/*.nupkg --source https://api.nuget.org/v3/index.json -k '${{ steps.nuget-login.outputs.NUGET_API_KEY }}'
if: ${{ !inputs.skip_nuget }}
run: dotnet nuget push ${{ runner.temp }}\deployables\NuGet\*.nupkg --source https://api.nuget.org/v3/index.json -k '${{ steps.nuget-login.outputs.NUGET_API_KEY }}'

- name: 💽 Upload artifacts to release
shell: pwsh
Expand Down
6 changes: 3 additions & 3 deletions src/nerdbank-streams/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,13 +10,13 @@
],
"main": "js/index.js",
"typings": "js/index.d.ts",
"homepage": "https://github.com/AArnott/Nerdbank.Streams",
"homepage": "https://github.com/dotnet/Nerdbank.Streams",
"repository": {
"type": "git",
"url": "git+https://github.com/AArnott/Nerdbank.Streams.git"
"url": "https://github.com/dotnet/Nerdbank.Streams"
},
"bugs": {
"url": "https://github.com/AArnott/Nerdbank.Streams/issues"
"url": "https://github.com/dotnet/Nerdbank.Streams/issues"
},
"author": {
"name": "Andrew Arnott",
Expand Down
6 changes: 6 additions & 0 deletions test/Directory.Build.targets
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,12 @@
<ItemGroup>
<Content Include="xunit.runner.json" CopyToOutputDirectory="PreserveNewest" Condition="Exists('xunit.runner.json')" />
</ItemGroup>
<ItemGroup>
<PackageVersion Remove="System.IO.Pipelines" />
<PackageVersion Remove="System.Runtime.CompilerServices.Unsafe" />
<PackageVersion Remove="System.Text.Json" />
<PackageVersion Remove="Microsoft.Bcl.AsyncInterfaces" />
</ItemGroup>

<Import Project="$([MSBuild]::GetPathOfFileAbove($(MSBuildThisFile), $(MSBuildThisFileDirectory)..))" />
</Project>
6 changes: 6 additions & 0 deletions test/Nerdbank.Streams.Tests/MultiplexingStreamV2Tests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -420,6 +420,12 @@ public async Task WindowDoesNotGrow_ForUnsaturatedChannel()
a.Output.Write(smallChunk);
await a.Output.FlushAsync(this.TimeoutToken);
await this.DrainAsync(b.Input, smallChunk.Length);

// Allow the acknowledgment to reach the sender before another half-window accumulates.
if ((i + 1) % 8 == 0)
{
await Task.Delay(ExpectedTimeout);
}
}

// The window should not have grown, so twice the original window must not fit.
Expand Down
11 changes: 9 additions & 2 deletions tools/artifacts/testResults.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -6,12 +6,19 @@ $result = @{}

$RepoRoot = Resolve-Path "$PSScriptRoot\..\.."
$testRoot = Join-Path $RepoRoot test
$result[$testRoot] = (Get-ChildItem "$testRoot\TestResults" -Recurse -Directory | Get-ChildItem -Recurse -File)
$legacyTestResults = Join-Path $testRoot TestResults
if (Test-Path $legacyTestResults) {
$result[$testRoot] = Get-ChildItem $legacyTestResults -Recurse -Directory |
Get-ChildItem -Recurse -File |
Where-Object { $_.Extension -ne '.dmp' -or $_.FullName -match '\\In\\' }
}

$artifactStaging = & "$PSScriptRoot/../Get-ArtifactsStagingDirectory.ps1"
$testlogsPath = Join-Path $artifactStaging "test_logs"
if (Test-Path $testlogsPath) {
$result[$testlogsPath] = Get-ChildItem $testlogsPath -Recurse;
# Hang and crash dumps are copied into the TRX attachment directory.
$result[$testlogsPath] = Get-ChildItem $testlogsPath -Recurse |
Where-Object { $_.Extension -ne '.dmp' -or $_.FullName -match '\\In\\' }
}

$result
Loading