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:
parent
0b51c2ef90
commit
0b55470e40
1 changed files with 22 additions and 0 deletions
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"
|
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
|
||||||
|
|
Loading…
Reference in a new issue