mirror of
				https://github.com/actions/cache.git
				synced 2025-10-31 22:40:55 +00:00 
			
		
		
		
	pip: include setup.py when calculating cache key
setup.py is used in Python packages instead of requirements.txt file See https://github.com/macbre/index-digest/pull/190 for a working example
This commit is contained in:
		
					parent
					
						
							
								8819edf476
							
						
					
				
			
			
				commit
				
					
						a97f6cee0f
					
				
			
		
					 1 changed files with 6 additions and 6 deletions
				
			
		
							
								
								
									
										12
									
								
								examples.md
									
										
									
									
									
								
							
							
						
						
									
										12
									
								
								examples.md
									
										
									
									
									
								
							|  | @ -309,7 +309,7 @@ Locations: | |||
| - uses: actions/cache@v2 | ||||
|   with: | ||||
|     path: ~/.cache/pip | ||||
|     key: ${{ runner.os }}-pip-${{ hashFiles('**/requirements.txt') }} | ||||
|     key: ${{ runner.os }}-pip-${{ hashFiles('**/requirements.txt', '**/setup.py') }} | ||||
|     restore-keys: | | ||||
|       ${{ runner.os }}-pip- | ||||
| ``` | ||||
|  | @ -323,7 +323,7 @@ Replace `~/.cache/pip` with the correct `path` if not using Ubuntu. | |||
|   if: startsWith(runner.os, 'Linux') | ||||
|   with: | ||||
|     path: ~/.cache/pip | ||||
|     key: ${{ runner.os }}-pip-${{ hashFiles('**/requirements.txt') }} | ||||
|     key: ${{ runner.os }}-pip-${{ hashFiles('**/requirements.txt', '**/setup.py') }} | ||||
|     restore-keys: | | ||||
|       ${{ runner.os }}-pip- | ||||
| 
 | ||||
|  | @ -331,7 +331,7 @@ Replace `~/.cache/pip` with the correct `path` if not using Ubuntu. | |||
|   if: startsWith(runner.os, 'macOS') | ||||
|   with: | ||||
|     path: ~/Library/Caches/pip | ||||
|     key: ${{ runner.os }}-pip-${{ hashFiles('**/requirements.txt') }} | ||||
|     key: ${{ runner.os }}-pip-${{ hashFiles('**/requirements.txt', '**/setup.py') }} | ||||
|     restore-keys: | | ||||
|       ${{ runner.os }}-pip- | ||||
| 
 | ||||
|  | @ -339,7 +339,7 @@ Replace `~/.cache/pip` with the correct `path` if not using Ubuntu. | |||
|   if: startsWith(runner.os, 'Windows') | ||||
|   with: | ||||
|     path: ~\AppData\Local\pip\Cache | ||||
|     key: ${{ runner.os }}-pip-${{ hashFiles('**/requirements.txt') }} | ||||
|     key: ${{ runner.os }}-pip-${{ hashFiles('**/requirements.txt', '**/setup.py') }} | ||||
|     restore-keys: | | ||||
|       ${{ runner.os }}-pip- | ||||
| ``` | ||||
|  | @ -357,7 +357,7 @@ Replace `~/.cache/pip` with the correct `path` if not using Ubuntu. | |||
|   uses: actions/cache@v2 | ||||
|   with: | ||||
|     path: ${{ steps.pip-cache.outputs.dir }} | ||||
|     key: ${{ runner.os }}-pip-${{ hashFiles('**/requirements.txt') }} | ||||
|     key: ${{ runner.os }}-pip-${{ hashFiles('**/requirements.txt', '**/setup.py') }} | ||||
|     restore-keys: | | ||||
|       ${{ runner.os }}-pip- | ||||
| ``` | ||||
|  | @ -374,7 +374,7 @@ Replace `~/.cache/pip` with the correct `path` if not using Ubuntu. | |||
| - uses: actions/cache@v2 | ||||
|   with: | ||||
|     path: ${{ steps.pip-cache.outputs.dir }} | ||||
|     key: ${{ runner.os }}-pip-${{ hashFiles('**/requirements.txt') }} | ||||
|     key: ${{ runner.os }}-pip-${{ hashFiles('**/requirements.txt', '**/setup.py') }} | ||||
|     restore-keys: | | ||||
|       ${{ runner.os }}-pip- | ||||
| ``` | ||||
|  |  | |||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue