Skip to content
Merged
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
25 changes: 23 additions & 2 deletions .github/workflows/run-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -257,6 +257,8 @@ jobs:
# Workaround for bug in Azure Functions Worker SDK. See https://github.com/Azure/azure-functions-dotnet-worker/issues/2969.
- name: Rebuild for Azure Functions project
if: inputs.testShortName == 'Playground'
Comment thread
radical marked this conversation as resolved.
env:
UseSharedCompilation: ${{ runner.os == 'Windows' && 'false' || '' }}
run: |
${{ env.DOTNET_SCRIPT }} build ${{ github.workspace }}/playground/AzureFunctionsEndToEnd/AzureFunctionsEndToEnd.Functions/AzureFunctionsEndToEnd.Functions.csproj /p:SkipUnstableEmulators=true

Expand Down Expand Up @@ -301,6 +303,15 @@ jobs:
if: runner.os == 'macOS'
uses: ./.github/actions/unlock-macos-keychain

# Shut down the Roslyn compiler server before running tests. On resource-constrained
# runners (e.g. 2-core windows-latest), VBCSCompiler stays resident and consumes
# ~150% CPU / 700MB RAM, starving the runner agent and causing "lost communication"
# crashes. This is fast and idempotent (no-op if no server is running).
# See https://github.com/microsoft/aspire/issues/15832
- name: Shutdown build server
if: runner.os == 'Windows'
run: ${{ env.DOTNET_SCRIPT }} build-server shutdown

- name: Run nuget dependent tests (Linux/macOS)
if: ${{ inputs.requiresNugets && runner.os != 'Windows' }}
working-directory: ${{ github.workspace }}/run-tests/
Expand Down Expand Up @@ -354,14 +365,17 @@ jobs:
TEST_LOG_PATH: ${{ github.workspace }}/artifacts/log/test-logs
TestsRunningOutsideOfRepo: true
TESTCONTAINERS_HUB_IMAGE_NAME_PREFIX: 'netaspireci.azurecr.io'
# Prevent VBCSCompiler from starting during tests. See #15832
UseSharedCompilation: false
# PR metadata and token for CLI E2E tests that download artifacts from a PR
GITHUB_PR_NUMBER: ${{ inputs.requiresCliArchive && github.event.pull_request.number || '' }}
GITHUB_PR_HEAD_SHA: ${{ inputs.requiresCliArchive && github.event.pull_request.head.sha || '' }}
GH_TOKEN: ${{ inputs.requiresCliArchive && github.token || '' }}
run: |
# Start heartbeat monitor in background (output goes to console directly)
# Use 60s interval on Windows to reduce overhead on constrained 2-core runners
$heartbeatProcess = Start-Process -FilePath "dotnet" `
-ArgumentList "${{ github.workspace }}\tools\scripts\Heartbeat.cs" `
-ArgumentList "${{ github.workspace }}\tools\scripts\Heartbeat.cs 60" `
-NoNewWindow -PassThru

try {
Expand Down Expand Up @@ -442,14 +456,21 @@ jobs:
NUGET_PACKAGES: ${{ github.workspace }}/.packages
PLAYWRIGHT_INSTALLED: ${{ !inputs.enablePlaywrightInstall && 'false' || 'true' }}
TESTCONTAINERS_HUB_IMAGE_NAME_PREFIX: 'netaspireci.azurecr.io'
# Prevent the Roslyn compiler server (VBCSCompiler) from starting during tests.
# On 2-core runners, VBCSCompiler consumes ~150% CPU / 700MB RAM and starves the
# runner agent, causing "lost communication" crashes. Projects are already pre-built,
# so any rebuild triggered by DCP's "dotnet run" should be minimal.
# See https://github.com/microsoft/aspire/issues/15832
UseSharedCompilation: false
# PR metadata and token for CLI E2E tests that download artifacts from a PR
GITHUB_PR_NUMBER: ${{ inputs.requiresCliArchive && github.event.pull_request.number || '' }}
GITHUB_PR_HEAD_SHA: ${{ inputs.requiresCliArchive && github.event.pull_request.head.sha || '' }}
GH_TOKEN: ${{ inputs.requiresCliArchive && github.token || '' }}
run: |
# Start heartbeat monitor in background (output goes to console directly)
# Use 60s interval on Windows to reduce overhead on constrained 2-core runners
$heartbeatProcess = Start-Process -FilePath "${{ env.DOTNET_SCRIPT }}" `
-ArgumentList "${{ github.workspace }}\tools\scripts\Heartbeat.cs" `
-ArgumentList "${{ github.workspace }}\tools\scripts\Heartbeat.cs 60" `
-NoNewWindow -PassThru

try {
Expand Down
Loading