Skip to content

Commit 069193c

Browse files
committed
.github/workflows/Generate-TestWorkflows.ps1: Added cache step with key based on all MSBuild files that manage package versions and references
1 parent 8ad9798 commit 069193c

1 file changed

Lines changed: 12 additions & 1 deletion

File tree

.github/workflows/Generate-TestWorkflows.ps1

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -295,7 +295,18 @@ jobs:
295295
with:
296296
dotnet-version: '$DotNet9SDKVersion'
297297
298-
- name: Restore dependencies
298+
- name: Cache NuGet Packages
299+
uses: actions/cache@v4
300+
with:
301+
# '**/*.*proj' includes .csproj, .vbproj, .fsproj, msbuildproj, etc.
302+
# '**/*.props' includes Directory.Packages.props, Directory.Build.props and Dependencies.props
303+
# '**/*.targets' includes Directory.Build.targets
304+
# '**/*.sln' and '*.sln' ensure root solution files are included (minimatch glitch for file extension .sln)
305+
# 'global.json' included for SDK version changes
306+
key: nuget-`${{ runner.os }}-`${{ hashFiles('**/*.*proj', '**/*.props', '**/*.targets', '**/*.sln', '*.sln', 'global.json') }}
307+
path: `${{ env.NUGET_PACKAGES }}
308+
309+
- name: Restore
299310
run: dotnet restore /p:TestFrameworks=true
300311
301312
- name: Setup Environment Variables

0 commit comments

Comments
 (0)