1
0
Fork 0
mirror of https://code.forgejo.org/actions/download-artifact.git synced 2024-12-23 12:36:01 +01:00

add test case for globbed downloads to same directory

This commit is contained in:
Rob Herley 2023-12-18 12:43:05 -05:00
parent 0b51c2ef90
commit 0b55470e40
No known key found for this signature in database
GPG key ID: D1602042C3543B06

View file

@ -106,3 +106,25 @@ jobs:
Write-Error "File contents of downloaded artifacts are incorrect" Write-Error "File contents of downloaded artifacts are incorrect"
} }
shell: pwsh 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