mirror of
https://github.com/actions/download-artifact.git
synced 2024-11-21 21:35:27 +00: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…
Reference in New Issue
Block a user