Repository navigation
Configure Windows NuGet package paths in GitHub Actions - #20705
Conversation
Use /mnt/nuget/packages on Linux and a workspace-local cache on Windows and macOS. Scope the environment to NuGet-consuming jobs and steps and remove conflicting test-step overrides. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
|
🚀 Dogfood this PR with:
curl -fsSL https://raw.githubusercontent.com/microsoft/aspire/main/eng/scripts/get-aspire-cli-pr.sh | bash -s -- 20705Or
iex "& { $(irm https://raw.githubusercontent.com/microsoft/aspire/main/eng/scripts/get-aspire-cli-pr.ps1) } 20705" |
There was a problem hiding this comment.
Copilot review overview
🟡 Changes recommended
Linux restores target root-owned /mnt without first creating a runner-writable cache directory.
Review effort: Balanced
Findings: 22
Open (23)
QuarantineTools uses an unwritable NuGet cache path · New Linux archive builds use an unprepared NuGet cache · New Package restore cannot write to the NuGet cache · New Stabilization restore uses an unwritable NuGet cache · New Linux installer validation uses an unprepared NuGet cache · New Setup restore fails because the NuGet cache is unwritable · New Issue generation uses an unwritable NuGet cache path · New Deployment artifact restore uses an unwritable NuGet cache · New Linux extension restores use an unprepared cache directory · New API diff restore uses an unwritable NuGet cache path · New ATS diff restore uses an unwritable NuGet cache path · New Flaky-test restore uses an unprepared NuGet cache directory · New Linux test restores fail because the NuGet cache is unwritable · New Build restore uses an unprepared NuGet cache directory · New Restore script cannot write to the NuGet cache path · New Failure reporting uses an unwritable NuGet cache path · New Test selection restore uses an unprepared NuGet cache path · New NuGet cache path is not writable on Ubuntu runners · New NuGet cache path is not writable on Ubuntu runners · New NuGet cache path is not writable on Ubuntu runners · New
And 3 more that still need to be addressed.
What changed in this PR
Standardizes NuGet package-cache paths across GitHub Actions workflows.
Changes:
- Moves Linux caches to
/mnt/nuget/packages. - Uses workspace-local caches on Windows/macOS.
- Removes inconsistent step-level overrides and documents the convention.
| File | Description |
|---|---|
docs/ci/TestingOnCI.md |
Documents cache-path guidance. |
.github/workflows/validate-agentic-workflows.yml |
Configures the validation cache. |
.github/workflows/update-dependencies.yml |
Configures dependency-update caching. |
.github/workflows/update-aspire-skills-bundle.yml |
Configures bundle-update caching. |
.github/workflows/update-ai-foundry-models.yml |
Configures model-generator caching. |
.github/workflows/typescript-api-compat.yml |
Configures API compatibility caching. |
.github/workflows/tests.yml |
Configures test-selection caching. |
.github/workflows/tests-outerloop.yml |
Configures failure-report caching. |
.github/workflows/tests-daily-smoke.yml |
Configures smoke-test caching. |
.github/workflows/specialized-test-runner.yml |
Configures runsheet-generation caching. |
.github/workflows/run-tests.yml |
Unifies restore and test caches. |
.github/workflows/reproduce-flaky-tests.yml |
Unifies flaky-test caches. |
.github/workflows/refresh-manifests.yml |
Configures Windows manifest caching. |
.github/workflows/prepare-installer-artifacts.yml |
Configures installer-test caching. |
.github/workflows/native-dashboard-validation.yml |
Updates the Windows test cache. |
.github/workflows/generate-ats-diffs.yml |
Configures ATS generation caching. |
.github/workflows/generate-api-diffs.yml |
Configures API generation caching. |
.github/workflows/extension-e2e-tests.yml |
Configures platform-specific E2E caching. |
.github/workflows/deployment-tests.yml |
Configures build and deployment caches. |
.github/workflows/create-failing-test-issue.yml |
Configures issue-tool caching. |
.github/workflows/copilot-setup-steps.yml |
Configures setup caching. |
.github/workflows/cli-starter-validation.yml |
Configures platform-specific validation caching. |
.github/workflows/ci.yml |
Configures stabilization-build caching. |
.github/workflows/build-packages.yml |
Configures package-build caching. |
.github/workflows/build-cli-native-archives.yml |
Configures native archive caching. |
.github/workflows/apply-test-attributes.yml |
Configures QuarantineTools caching. |
Restore existing Linux and macOS cache behavior. Configure the workspace-local NuGet cache only for Windows consumers and remove Windows test-step overrides. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
This comment has been minimized.
This comment has been minimized.
There was a problem hiding this comment.
Copilot review overview
🟡 Changes recommended
The refresh-manifests workflow would stage its unignored NuGet cache into generated pull requests.
Review effort: Balanced
Findings: 1
Open (1)
Resolved since last review (23)
NuGet restore fails because cache directory lacks permissions NuGet cache path is not writable on Ubuntu runners NuGet cache path is not writable on Ubuntu runners NuGet cache path is not writable on Ubuntu runners NuGet cache path is not writable on Ubuntu runners Test selection restore uses an unprepared NuGet cache path Failure reporting uses an unwritable NuGet cache path Restore script cannot write to the NuGet cache path Build restore uses an unprepared NuGet cache directory Linux test restores fail because the NuGet cache is unwritable Flaky-test restore uses an unprepared NuGet cache directory ATS diff restore uses an unwritable NuGet cache path API diff restore uses an unwritable NuGet cache path Linux extension restores use an unprepared cache directory Deployment artifact restore uses an unwritable NuGet cache Issue generation uses an unwritable NuGet cache path Setup restore fails because the NuGet cache is unwritable Linux installer validation uses an unprepared NuGet cache Stabilization restore uses an unwritable NuGet cache Package restore cannot write to the NuGet cache
And 3 more resolved.
|
Retrying the failed CI jobs for this pull request from the CI run attempt. The rerun is being tracked in the rerun attempt. |
James Newton-King (JamesNK)
left a comment
There was a problem hiding this comment.
Reviewed the current revision; no additional high-confidence findings.
CI confidence report🔴 BLOCKED — fix before merge: two touched workflows lack final-definition execution: Required validation: 🔴 2 missing · 🟡 1 attention · 🟢 11 verified · ⚪ 3 not applicable Reviewer actions
Evidence🔴 refresh-manifests workflow unrun
🔴 reproduce-flaky-tests workflow unrun
🟡 PSScriptAnalyzer reports added alias warnings
🟢 Verified checks (11)
⚪ Not applicable (3)
Scope and method
Runs and links consulted (11)
Ready-to-use pr-testing prompt
Unknowns
|
Defer manifest refresh and flaky reproduction cache changes until their workflows can be validated safely. Replace added PowerShell echo aliases with Write-Output. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
|
Addressed the CI confidence report in 6df9193:
The earlier successful Windows runs remain evidence for the cache-path behavior, but CI still needs to finish on the latest commit. |
This comment has been minimized.
This comment has been minimized.
|
Retrying the failed CI jobs for this pull request from the CI run attempt. The rerun is being tracked in the rerun attempt. |
Clarified instructions for Windows GitHub Actions regarding NuGet package handling and caching. Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
Tests selectorSelects the full PR test matrix + all PR-gated jobs (ALL) — a rule matching '.github/workflows/run-tests.yml' selects ALL Selection computed for commit |
|
✅ No documentation update needed. Step 5 branch taken: Triggered signals (1): Allowlist justification (
The change configures a shared Windows NuGet package cache path ( |



Description
Use
${{ github.workspace }}/.nuget/packagesfor Windows GitHub Actions scripts that restore or consume NuGet packages. Keep Windows restore, build, and test steps on the same cache instead of switching between.packagesandnuget-cache.Multi-platform jobs configure the variable through
GITHUB_ENVin Windows-only setup steps; Windows-only consumers set it at step scope. Remove conflicting Windows test-step overrides and document the convention. Linux and macOS retain their existing cache behavior. No new dependencies.Cache changes to
refresh-manifests.ymlandreproduce-flaky-tests.ymlare deferred because safe final-definition validation is unavailable. Both files are unchanged from the original PR base. Added PowerShell statements useWrite-Outputrather than aliases.Validation
git diff --check: passed.actionlint -shellcheck= -pyflakes= .github/workflows/build-cli-native-archives.yml .github/workflows/cli-starter-validation.yml .github/workflows/extension-e2e-tests.yml .github/workflows/native-dashboard-validation.yml .github/workflows/prepare-installer-artifacts.yml .github/workflows/run-tests.yml: passed.git diff 1bb3437a51^ --exit-code -- .github/workflows/refresh-manifests.yml .github/workflows/reproduce-flaky-tests.yml: passed, confirming both deferred workflows are unchanged.Fixes # (issue)
Checklist
<remarks />and<code />elements on your triple slash comments?