Skip to content
Merged
Show file tree
Hide file tree
Changes from 3 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
5 changes: 5 additions & 0 deletions .github/workflows/build-cli-native-archives.yml
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,11 @@ jobs:
ASPIRE_CLI_CHANNEL: ${{ github.event_name == 'pull_request' && format('pr-{0}', github.event.pull_request.number) || (startsWith(github.ref, 'refs/heads/release/') || startsWith(github.ref, 'refs/heads/internal/release/')) && 'staging' || github.ref == 'refs/heads/main' && 'local' || 'daily' }}

steps:
- name: Configure NuGet package cache (Windows)
if: runner.os == 'Windows'
shell: pwsh
run: Write-Output "NUGET_PACKAGES=${{ github.workspace }}/.nuget/packages" >> $env:GITHUB_ENV

- name: Checkout code
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1

Expand Down
5 changes: 5 additions & 0 deletions .github/workflows/cli-starter-validation.yml
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,11 @@ jobs:
env:
GH_TOKEN: ${{ github.token }}
steps:
- name: Configure NuGet package cache (Windows)
if: runner.os == 'Windows'
shell: pwsh
run: Write-Output "NUGET_PACKAGES=${{ github.workspace }}/.nuget/packages" >> $env:GITHUB_ENV

- name: Checkout PR head
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
with:
Expand Down
5 changes: 5 additions & 0 deletions .github/workflows/extension-e2e-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -459,6 +459,11 @@ jobs:
shell: pwsh

steps:
- name: Configure NuGet package cache (Windows)
if: runner.os == 'Windows'
shell: pwsh
run: Write-Output "NUGET_PACKAGES=${{ github.workspace }}/.nuget/packages" >> $env:GITHUB_ENV

- name: Checkout code
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1

Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/native-dashboard-validation.yml
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ jobs:
if: ${{ inputs.rid == 'win-x64' }}
shell: pwsh
env:
NUGET_PACKAGES: ${{ github.workspace }}/.packages
NUGET_PACKAGES: ${{ format('{0}/.nuget/packages', github.workspace) }}
run: >
./dotnet.cmd test
--project tests/Aspire.Dashboard.Tests/Aspire.Dashboard.Tests.csproj
Expand Down
2 changes: 2 additions & 0 deletions .github/workflows/prepare-installer-artifacts.yml
Original file line number Diff line number Diff line change
Expand Up @@ -91,6 +91,8 @@ jobs:
- name: Smoke test installed CLI (aspire new + restore)
if: ${{ inputs.installer == 'winget' }}
shell: pwsh
env:
NUGET_PACKAGES: ${{ format('{0}/.nuget/packages', github.workspace) }}
run: |
$ErrorActionPreference = 'Stop'
# winget added the shim under %LOCALAPPDATA%\Microsoft\WinGet\Links during the
Expand Down
3 changes: 1 addition & 2 deletions .github/workflows/run-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -81,6 +81,7 @@ jobs:
run: |
echo "DOTNET_SCRIPT=.\dotnet.cmd" >> $env:GITHUB_ENV
echo "BUILD_SCRIPT=.\build.cmd" >> $env:GITHUB_ENV
Write-Output "NUGET_PACKAGES=${{ github.workspace }}/.nuget/packages" >> $env:GITHUB_ENV
echo "TEST_RUN_PATH=${{ github.workspace }}\run-tests" >> $env:GITHUB_ENV
echo ${{ github.workspace }}\.dotnet >> $env:GITHUB_PATH

Expand Down Expand Up @@ -452,7 +453,6 @@ jobs:
env:
ASPIRE__TEST__DCPLOGBASEPATH: ${{ github.workspace }}/testresults/dcp
BUILT_NUGETS_PATH: ${{ github.workspace }}/artifacts/packages/Debug/Shipping
NUGET_PACKAGES: ${{ github.workspace }}/nuget-cache
PLAYWRIGHT_INSTALLED: ${{ fromJson(inputs.properties).enablePlaywrightInstall != true && 'false' || 'true' }}
TEST_LOG_PATH: ${{ github.workspace }}/artifacts/log/test-logs
TestsRunningOutsideOfRepo: true
Expand Down Expand Up @@ -580,7 +580,6 @@ jobs:
shell: pwsh
env:
ASPIRE__TEST__DCPLOGBASEPATH: ${{ github.workspace }}/testresults/dcp
NUGET_PACKAGES: ${{ github.workspace }}/.packages
PLAYWRIGHT_INSTALLED: ${{ fromJson(inputs.properties).enablePlaywrightInstall != true && 'false' || 'true' }}
TESTCONTAINERS_HUB_IMAGE_NAME_PREFIX: 'netaspireci.azurecr.io'
# Prevent the Roslyn compiler server (VBCSCompiler) from starting during tests.
Expand Down
6 changes: 6 additions & 0 deletions docs/ci/TestingOnCI.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,12 @@ The CI test infrastructure uses a unified matrix generation system that:

For how MTP diagnostic arguments (hang dump, crash dump, etc.) flow through this pipeline, see [MTP Args Pipeline](mtp-args-pipeline.md).

Windows GitHub Actions jobs that restore or consume NuGet packages use
`${{ github.workspace }}/.nuget/packages`. Multi-platform jobs set
`NUGET_PACKAGES` through `GITHUB_ENV` only on Windows so restore, build, and test
steps share the same cache. Steps that are the only NuGet consumer set the
variable at step scope. Linux and macOS retain their existing cache behavior.
Comment thread
Copilot marked this conversation as resolved.
Resolved

## Architecture

```text
Expand Down
Loading