mirror of
				https://git.mirrors.martin98.com/https://github.com/actions/download-artifact
				synced 2025-10-31 12:21:10 +08:00 
			
		
		
		
	add test case for globbed downloads to same directory
This commit is contained in:
		
							parent
							
								
									0b51c2ef90
								
							
						
					
					
						commit
						0b55470e40
					
				
							
								
								
									
										22
									
								
								.github/workflows/test.yml
									
									
									
									
										vendored
									
									
								
							
							
						
						
									
										22
									
								
								.github/workflows/test.yml
									
									
									
									
										vendored
									
									
								
							| @ -106,3 +106,25 @@ jobs: | ||||
|             Write-Error "File contents of downloaded artifacts are incorrect" | ||||
|         } | ||||
|       shell: pwsh | ||||
| 
 | ||||
|     # Test glob downloading both artifacts to same directory | ||||
|     - name: Download all Artifacts | ||||
|       uses: ./ | ||||
|       with: | ||||
|         pattern: Artifact-* | ||||
|         path: single/directory | ||||
|         merge-multiple: true | ||||
| 
 | ||||
|     - name: Verify successful download | ||||
|       run: | | ||||
|         $fileA = "single/directory/file-A.txt" | ||||
|         $fileB = "single/directory/file-B.txt" | ||||
|         if(!(Test-Path -path $fileA) -or !(Test-Path -path $fileB)) | ||||
|         { | ||||
|             Write-Error "Expected files do not exist" | ||||
|         } | ||||
|         if(!((Get-Content $fileA) -ceq "Lorem ipsum dolor sit amet") -or !((Get-Content $fileB) -ceq "Hello world from file B")) | ||||
|         { | ||||
|             Write-Error "File contents of downloaded artifacts are incorrect" | ||||
|         } | ||||
|       shell: pwsh | ||||
|  | ||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user
	 Rob Herley
						Rob Herley