2323 steps :
2424 - name : Checkout
2525 uses : actions/checkout@v4
26+ with :
27+ persist-credentials : false
2628
2729 - name : Simple 1 invoke - no copy, no artifact
2830 id : simple1
@@ -40,11 +42,18 @@ jobs:
4042
4143 - name : Simple 1 - assert
4244 shell : python
45+ env :
46+ EXPECTED_HASH : ${{ hashFiles('.test/simple-build/src') }}
47+ OUTPUT_HASH : ${{ steps.simple1.outputs.hash }}
48+ OUTPUT_BUILD_HTML : ${{ steps.simple1.outputs.build-html }}
49+ ARTIFACT_HASH : ${{ hashFiles(steps.simple1-artifact.outputs.download-path) }}
4350 run : |
44- expected_hash = r'${{ hashFiles('.test/simple-build/src') }}'
45- output_hash = r'${{ steps.simple1.outputs.hash }}'
46- output_build_html = r'${{ steps.simple1.outputs.build-html }}'
47- artifact_hash = r'${{ hashFiles(steps.simple1-artifact.outputs.download-path) }}'
51+ import os
52+
53+ expected_hash = os.environ['ARTIFACT_HASH']
54+ output_hash = os.environ['OUTPUT_HASH']
55+ output_build_html = os.environ['OUTPUT_BUILD_HTML']
56+ artifact_hash = os.environ['ARTIFACT_HASH']
4857
4958 assert output_build_html == '.test/simple-build/build/html'
5059 assert output_hash == expected_hash
@@ -67,12 +76,20 @@ jobs:
6776
6877 - name : Simple 2 - assert
6978 shell : python
79+ env :
80+ expected_hash : ${{ hashFiles('.test/simple-build/src') }}
81+ output_hash : ${{ steps.simple2.outputs.hash }}
82+ output_build_html : ${{ steps.simple2.outputs.build-html }}
83+ artifact_hash : ${{ hashFiles(steps.simple2-artifact.outputs.download-path) }}
84+ original_build_hash : ${{ hashFiles('.test/simple-build/build/html') }}
7085 run : |
71- expected_hash = r'${{ hashFiles('.test/simple-build/src') }}'
72- output_hash = r'${{ steps.simple2.outputs.hash }}'
73- output_build_html = r'${{ steps.simple2.outputs.build-html }}'
74- artifact_hash = r'${{ hashFiles(steps.simple2-artifact.outputs.download-path) }}'
75- original_build_hash = r'${{ hashFiles('.test/simple-build/build/html') }}'
86+ import os
87+
88+ expected_hash = os.environ['expected_hash']
89+ output_hash = os.environ['output_hash']
90+ output_build_html = os.environ['output_build_html']
91+ artifact_hash = os.environ['artifact_hash']
92+ original_build_hash = os.environ['original_build_hash']
7693
7794 assert output_build_html == '.copies/simple2/html'
7895 assert output_hash == expected_hash
@@ -97,26 +114,36 @@ jobs:
97114
98115 - name : Simple 3 - assert
99116 shell : python
117+ env :
118+ expected_hash : ${{ hashFiles('.test/simple-build/src') }}
119+ output_hash : ${{ steps.simple3.outputs.hash }}
120+ output_build_html : ${{ steps.simple3.outputs.build-html }}
121+ artifact_hash : ${{ hashFiles(steps.simple3-artifact.outputs.download-path) }}
100122 run : |
101- expected_hash = r'${{ hashFiles('.test/simple-build/src') }}'
102- output_hash = r'${{ steps.simple3.outputs.hash }}'
103- output_build_html = r'${{ steps.simple3.outputs.build-html }}'
104- artifact_hash = r'${{ hashFiles(steps.simple3-artifact.outputs.download-path) }}'
123+ import os
124+
125+ expected_hash = os.environ['expected_hash']
126+ output_hash = os.environ['output_hash']
127+ output_build_html = os.environ['output_build_html']
128+ artifact_hash = os.environ['artifact_hash']
105129
106130 assert output_build_html == '.test/simple-build/build/html'
107131 assert output_hash == expected_hash
108132 assert artifact_hash == output_hash
109133
110134 - name : Simple 3 - bash asserts
135+ env :
136+ ARTIFACTS_URL : ${{ steps.simple3.outputs.artifact-url }}
137+ DOWNLOAD_PATH : ${{ steps.simple3-artifact.outputs.download-path }}
111138 run : |
112139 set -eu
113140
114141 # this URL only goes to the run page, not to an individual artifact
115142 # so all we're really checking here is that it's a valid URL that's accessible
116- wget '${{ steps.simple3.outputs.artifact-url }}'
143+ wget "${ARTIFACTS_URL}"
117144
118145 # ensure that the html directory is not present in the downloaded artifact
119- test ! -d "${{ steps.simple3-artifact.outputs.download-path } }/html"
146+ test ! -d "${DOWNLOAD_PATH }/html"
120147
121148 - name : Simple 4 invoke - with copy, with artifact
122149 id : simple4
@@ -137,28 +164,39 @@ jobs:
137164
138165 - name : Simple 4 - assert
139166 shell : python
167+ env :
168+ expected_hash : ${{ hashFiles('.test/simple-build/src') }}
169+ output_hash : ${{ steps.simple4.outputs.hash }}
170+ output_build_html : ${{ steps.simple4.outputs.build-html }}
171+ artifact_hash : ${{ hashFiles(steps.simple4-artifact.outputs.download-path) }}
172+ original_build_hash : ${{ hashFiles('.test/simple-build/build/html') }}
140173 run : |
141- expected_hash = r'${{ hashFiles('.test/simple-build/src') }}'
142- output_hash = r'${{ steps.simple4.outputs.hash }}'
143- output_build_html = r'${{ steps.simple4.outputs.build-html }}'
144- artifact_hash = r'${{ hashFiles(steps.simple4-artifact.outputs.download-path) }}'
145- original_build_hash = r'${{ hashFiles('.test/simple-build/build/html') }}'
174+ import os
175+
176+ expected_hash = os.environ['expected_hash']
177+ output_hash = os.environ['output_hash']
178+ output_build_html = os.environ['output_build_html']
179+ artifact_hash = os.environ['artifact_hash']
180+ original_build_hash = os.environ['original_build_hash']
146181
147182 assert output_build_html == '.copies/simple4/html'
148183 assert output_hash == expected_hash
149184 assert output_hash == original_build_hash
150185 assert artifact_hash == output_hash
151186
152187 - name : Simple 4 - bash asserts
188+ env :
189+ ARTIFACTS_URL : ${{ steps.simple4.outputs.artifact-url }}
190+ DOWNLOAD_PATH : ${{ steps.simple4-artifact.outputs.download-path }}
153191 run : |
154192 set -eu
155193
156194 # this URL only goes to the run page, not to an individual artifact
157195 # so all we're really checking here is that it's a valid URL that's accessible
158- wget '${{ steps.simple4.outputs.artifact-url }}'
196+ wget "${ARTIFACTS_URL}"
159197
160198 # ensure that the html directory is not present in the downloaded artifact
161- test ! -d "${{ steps.simple4-artifact.outputs.download-path } }/html"
199+ test ! -d "${DOWNLOAD_PATH }/html"
162200
163201 - name : Simple 5 invoke - with copy, with artifact, trailing slash in input
164202 id : simple5
@@ -179,25 +217,36 @@ jobs:
179217
180218 - name : Simple 5 - assert
181219 shell : python
220+ env :
221+ expected_hash : ${{ hashFiles('.test/simple-build/src') }}
222+ output_hash : ${{ steps.simple5.outputs.hash }}
223+ output_build_html : ${{ steps.simple5.outputs.build-html }}
224+ artifact_hash : ${{ hashFiles(steps.simple5-artifact.outputs.download-path) }}
225+ original_build_hash : ${{ hashFiles('.test/simple-build/build/html/') }}
182226 run : |
183- expected_hash = r'${{ hashFiles('.test/simple-build/src') }}'
184- output_hash = r'${{ steps.simple5.outputs.hash }}'
185- output_build_html = r'${{ steps.simple5.outputs.build-html }}'
186- artifact_hash = r'${{ hashFiles(steps.simple5-artifact.outputs.download-path) }}'
187- original_build_hash = r'${{ hashFiles('.test/simple-build/build/html/') }}'
227+ import os
228+
229+ expected_hash = os.environ['expected_hash ']
230+ output_hash = os.environ['output_hash']
231+ output_build_html = os.environ['output_build_html']
232+ artifact_hash = os.environ['artifact_hash']
233+ original_build_hash = os.environ['original_build_hash']
188234
189235 assert output_build_html == '.copies/simple5/html/'
190236 assert output_hash == expected_hash
191237 assert output_hash == original_build_hash
192238 assert artifact_hash == output_hash
193239
194240 - name : Simple 5 - bash asserts
241+ env :
242+ ARTIFACTS_URL : ${{ steps.simple5.outputs.artifact-url }}
243+ DOWNLOAD_PATH : ${{ steps.simple5-artifact.outputs.download-path }}
195244 run : |
196245 set -eu
197246
198247 # this URL only goes to the run page, not to an individual artifact
199248 # so all we're really checking here is that it's a valid URL that's accessible
200- wget '${{ steps.simple5.outputs.artifact-url }}'
249+ wget "${ARTIFACTS_URL}"
201250
202251 # ensure that the html directory is not present in the downloaded artifact
203- test ! -d "${{ steps.simple5-artifact.outputs.download-path } }/html"
252+ test ! -d "${DOWNLOAD_PATH }/html"
0 commit comments