@@ -46,14 +46,18 @@ jobs:
46
46
- name : Test
47
47
run : npm run test
48
48
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
50
50
- name : Create artifact files
51
51
run : |
52
52
mkdir -p path/to/dir-1
53
53
mkdir -p path/to/dir-2
54
54
mkdir -p path/to/dir-3
55
+ mkdir -p symlink/
55
56
echo "Lorem ipsum dolor sit amet" > path/to/dir-1/file1.txt
56
57
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
57
61
58
62
# Upload a single file artifact
59
63
- name : ' Upload artifact #1'
79
83
path/to/dir-[23]/*
80
84
!path/to/dir-3/*.txt
81
85
86
+ - name : ' Upload symlinked artifact'
87
+ uses : ./
88
+ with :
89
+ name : ' Symlinked-Artifact-${{ matrix.runs-on }}'
90
+ path : symlink/file.txt
91
+
82
92
# Download Artifact #1 and verify the correctness of the content
83
93
- name : ' Download artifact #1'
84
94
uses : actions/download-artifact@v4
@@ -141,6 +151,25 @@ jobs:
141
151
}
142
152
shell : pwsh
143
153
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
+
144
173
- name : ' Alter file 1 content'
145
174
run : |
146
175
echo "This file has changed" > path/to/dir-1/file1.txt
0 commit comments