|
56 | 56 | echo "Lorem ipsum dolor sit amet" > path/to/dir-1/file1.txt
|
57 | 57 | echo "Hello world from file #2" > path/to/dir-2/file2.txt
|
58 | 58 | echo "Hello from a symlinked file" > symlink/original.txt
|
59 |
| - ln -s $(pwd)/symlink/original.txt symlink/file.txt |
| 59 | + ln -s $(pwd)/symlink/original.txt symlink/abs.txt |
| 60 | + ln -s original.txt symlink/rel.txt |
60 | 61 | shell: bash
|
61 | 62 |
|
62 | 63 | # Upload a single file artifact
|
|
87 | 88 | uses: ./
|
88 | 89 | with:
|
89 | 90 | name: 'Symlinked-Artifact-${{ matrix.runs-on }}'
|
90 |
| - path: symlink/file.txt |
| 91 | + path: | |
| 92 | + symlink/abs.txt |
| 93 | + symlink/rel.txt |
91 | 94 |
|
92 | 95 | # Download Artifact #1 and verify the correctness of the content
|
93 | 96 | - name: 'Download artifact #1'
|
@@ -159,12 +162,21 @@ jobs:
|
159 | 162 |
|
160 | 163 | - name: 'Verify symlinked artifact'
|
161 | 164 | run: |
|
162 |
| - $file = "from/symlink/file.txt" |
163 |
| - if(!(Test-Path -path $file)) |
| 165 | + $abs = "from/symlink/abs.txt" |
| 166 | + if(!(Test-Path -path $abs)) |
| 167 | + { |
| 168 | + Write-Error "Expected file does not exist" |
| 169 | + } |
| 170 | + if(!((Get-Content $abs) -ceq "Hello from a symlinked file")) |
| 171 | + { |
| 172 | + Write-Error "File contents of downloaded artifact are incorrect" |
| 173 | + } |
| 174 | + $rel = "from/symlink/rel.txt" |
| 175 | + if(!(Test-Path -path $rel)) |
164 | 176 | {
|
165 | 177 | Write-Error "Expected file does not exist"
|
166 | 178 | }
|
167 |
| - if(!((Get-Content $file) -ceq "Hello from a symlinked file")) |
| 179 | + if(!((Get-Content $rel) -ceq "Hello from a symlinked file")) |
168 | 180 | {
|
169 | 181 | Write-Error "File contents of downloaded artifact are incorrect"
|
170 | 182 | }
|
|
0 commit comments