mirror of
				https://github.com/actions/setup-dotnet.git
				synced 2025-10-31 16:13:46 +00:00 
			
		
		
		
	Merge 4cd5bdca49a7de0c41198a180105d80acd125c04 into 740310365d5065c44c30d213e7963107ebfd22d5
This commit is contained in:
		
						commit
						6e669a9dce
					
				| @ -50,7 +50,7 @@ describe('cache-restore tests', () => { | ||||
| 
 | ||||
|       await restoreCache(lockFilePattern); | ||||
| 
 | ||||
|       const expectedKey = `dotnet-cache-${process.env.RUNNER_OS}-hash`; | ||||
|       const expectedKey = `dotnet-cache-${process.env.RUNNER_OS}-${process.arch}-hash`; | ||||
|       expect(jest.mocked(core.saveState)).toHaveBeenCalledWith( | ||||
|         'CACHE_KEY', | ||||
|         expectedKey | ||||
| @ -66,7 +66,7 @@ describe('cache-restore tests', () => { | ||||
|     }); | ||||
| 
 | ||||
|     it('calls core.saveState("CACHE_RESULT") when cache.restoreCache() returns key', async () => { | ||||
|       const expectedKey = `dotnet-cache-${process.env.RUNNER_OS}-hash`; | ||||
|       const expectedKey = `dotnet-cache-${process.env.RUNNER_OS}-${process.arch}-hash`; | ||||
|       jest.mocked(glob.hashFiles).mockResolvedValue('hash'); | ||||
|       jest.mocked(cache.restoreCache).mockResolvedValue(expectedKey); | ||||
| 
 | ||||
|  | ||||
							
								
								
									
										3
									
								
								dist/setup/index.js
									
									
									
									
										vendored
									
									
								
							
							
						
						
									
										3
									
								
								dist/setup/index.js
									
									
									
									
										vendored
									
									
								
							| @ -100258,7 +100258,8 @@ const restoreCache = async (cacheDependencyPath) => { | ||||
|         throw new Error('Some specified paths were not resolved, unable to cache dependencies.'); | ||||
|     } | ||||
|     const platform = process.env.RUNNER_OS; | ||||
|     const primaryKey = `dotnet-cache-${platform}-${fileHash}`; | ||||
|     const arch = process.arch; | ||||
|     const primaryKey = `dotnet-cache-${platform}-${arch}-${fileHash}`; | ||||
|     core.debug(`primary key is ${primaryKey}`); | ||||
|     core.saveState(constants_1.State.CachePrimaryKey, primaryKey); | ||||
|     const { 'global-packages': cachePath } = await (0, cache_utils_1.getNuGetFolderPath)(); | ||||
|  | ||||
| @ -17,7 +17,8 @@ export const restoreCache = async (cacheDependencyPath?: string) => { | ||||
|   } | ||||
| 
 | ||||
|   const platform = process.env.RUNNER_OS; | ||||
|   const primaryKey = `dotnet-cache-${platform}-${fileHash}`; | ||||
|   const arch = process.arch; | ||||
|   const primaryKey = `dotnet-cache-${platform}-${arch}-${fileHash}`; | ||||
|   core.debug(`primary key is ${primaryKey}`); | ||||
| 
 | ||||
|   core.saveState(State.CachePrimaryKey, primaryKey); | ||||
|  | ||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user