Skip to content

Commit

Permalink
add test case for globbed downloads to same directory
Browse files Browse the repository at this point in the history
  • Loading branch information
robherley committed Dec 18, 2023
1 parent 0b51c2e commit 0b55470
Showing 1 changed file with 22 additions and 0 deletions.
22 changes: 22 additions & 0 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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

0 comments on commit 0b55470

Please sign in to comment.