@@ -46,14 +46,18 @@ jobs:
4646 - name : Test
4747 run : npm run test
4848
49- # Test end-to-end by uploading two artifacts and then downloading them
49+ # Test end-to-end by uploading a few artifacts and then downloading them
5050 - name : Create artifact files
5151 run : |
5252 mkdir -p path/to/dir-1
5353 mkdir -p path/to/dir-2
5454 mkdir -p path/to/dir-3
55+ mkdir -p symlink/
5556 echo "Lorem ipsum dolor sit amet" > path/to/dir-1/file1.txt
5657 echo "Hello world from file #2" > path/to/dir-2/file2.txt
58+ echo "Hello from a symlinked file" > symlink/original.txt
59+ ln -s $(pwd)/symlink/original.txt symlink/file.txt
60+ shell : bash
5761
5862 # Upload a single file artifact
5963 - name : ' Upload artifact #1'
7983 path/to/dir-[23]/*
8084 !path/to/dir-3/*.txt
8185
86+ - name : ' Upload symlinked artifact'
87+ uses : ./
88+ with :
89+ name : ' Symlinked-Artifact-${{ matrix.runs-on }}'
90+ path : symlink/file.txt
91+
8292 # Download Artifact #1 and verify the correctness of the content
8393 - name : ' Download artifact #1'
8494 uses : actions/download-artifact@v4
@@ -141,6 +151,25 @@ jobs:
141151 }
142152 shell : pwsh
143153
154+ - name : ' Download symlinked artifact'
155+ uses : actions/download-artifact@v4
156+ with :
157+ name : ' Symlinked-Artifact-${{ matrix.runs-on }}'
158+ path : from/symlink
159+
160+ - name : ' Verify symlinked artifact'
161+ run : |
162+ $file = "from/symlink/file.txt"
163+ if(!(Test-Path -path $file))
164+ {
165+ Write-Error "Expected file does not exist"
166+ }
167+ if(!((Get-Content $file) -ceq "Hello from a symlinked file"))
168+ {
169+ Write-Error "File contents of downloaded artifact are incorrect"
170+ }
171+ shell : pwsh
172+
144173 - name : ' Alter file 1 content'
145174 run : |
146175 echo "This file has changed" > path/to/dir-1/file1.txt
0 commit comments