1717# image_tag_prefix: slips-my-tests
1818# container_prefix: slips-my-tess
1919
20+
21+ # this file runs either
22+ # build-docker-image -> dockerfile-image-tests
23+ # or
24+ # dependency-image-tests -> prebuilt-docker-image-tests
25+
26+
2027name : test-suite
2128
2229on :
8693 required : false
8794 default : " "
8895 type : string
96+ setup_venv :
97+ description : " Inside the test container, create a fresh python3.10 venv, install install/requirements.txt into it, and run the tests with it"
98+ required : false
99+ default : false
100+ type : boolean
89101
90102jobs :
91103 list-tests :
@@ -115,6 +127,7 @@ jobs:
115127 with :
116128 ref : ${{ github.ref }}
117129 fetch-depth : 0
130+ lfs : true
118131
119132 - name : Prepare Docker image metadata
120133 id : image
@@ -132,7 +145,7 @@ jobs:
132145
133146 dependency-image-tests :
134147 # runs slips tests inside a pre-built slips dependency docker image at stratosphereips/slips_dependencies
135- name : ${{ inputs.test_suite_name }}
148+ name : " ${{ matrix.display_name && format('{0} / {1}', inputs.test_suite_name, matrix.display_name) || format('{0} (dependency image)', inputs.test_suite_name) }} "
136149 if : ${{ !inputs.build_dockerfile && inputs.docker_image_artifact_name == '' && inputs.docker_image_tag == '' }}
137150 needs : list-tests
138151 runs-on : ubuntu-22.04
@@ -150,13 +163,20 @@ jobs:
150163 strategy :
151164 fail-fast : false
152165 matrix :
153- test_file : ${{ fromJson(needs.list-tests.outputs.test_files) }}
166+ include : ${{ fromJson(needs.list-tests.outputs.test_files) }}
154167
155168 steps :
169+ - name : Install git-lfs
170+ run : |
171+ apt-get update
172+ apt-get install -y --no-install-recommends git-lfs
173+ git lfs install
174+
156175 - uses : actions/checkout@v7
157176 with :
158177 ref : ${{ github.ref }}
159178 fetch-depth : 0
179+ lfs : true
160180
161181 - name : Run ${{ inputs.test_suite_name }} for ${{ matrix.test_file }}
162182 uses : ./.github/workflows/reusable/run-test-file
@@ -169,9 +189,10 @@ jobs:
169189 artifact_name : ${{ inputs.artifact_name_prefix && format('{0}{1}', inputs.artifact_name_prefix, strategy.job-index) || '' }}
170190 artifact_name_suffix : ${{ inputs.artifact_name_suffix }}
171191
192+
172193 dockerfile-image-tests :
173- # runs slips tests inside a newly created docker image from docker/Dockerfile
174- name : ${{ inputs.test_suite_name }}
194+ # runs slips tests inside a newly built img from the "build- docker-image" step.
195+ name : " ${{ matrix.display_name && format('{0} / {1}', inputs.test_suite_name, matrix.display_name) || format('{0} (build dockerfile)', inputs.test_suite_name) }} "
175196 if : ${{ inputs.build_dockerfile }}
176197 needs :
177198 - list-tests
@@ -186,16 +207,17 @@ jobs:
186207 strategy :
187208 fail-fast : false
188209 matrix :
189- test_file : ${{ fromJson(needs.list-tests.outputs.test_files) }}
210+ include : ${{ fromJson(needs.list-tests.outputs.test_files) }}
190211
191212 steps :
192213 - uses : actions/checkout@v7
193214 with :
194215 ref : ${{ github.ref }}
195216 fetch-depth : 0
217+ lfs : true
196218
197219 - name : Download Docker Image
198- uses : actions/download-artifact@v5
220+ uses : actions/download-artifact@v8
199221 with :
200222 name : ${{ needs.build-docker-image.outputs.artifact_name }}
201223
@@ -218,7 +240,7 @@ jobs:
218240
219241 prebuilt-docker-image-tests :
220242 # runs slips tests inside a Docker image built by the caller and passed as an artifact
221- name : ${{ inputs.test_suite_name }}
243+ name : " ${{ matrix.display_name && format('{0} / {1}', inputs.test_suite_name, matrix.display_name) || format('{0} (prebuilt image)', inputs.test_suite_name) }} "
222244 if : ${{ !inputs.build_dockerfile && inputs.docker_image_artifact_name != '' && inputs.docker_image_tag != '' }}
223245 needs : list-tests
224246 runs-on : ubuntu-22.04
@@ -231,16 +253,17 @@ jobs:
231253 strategy :
232254 fail-fast : false
233255 matrix :
234- test_file : ${{ fromJson(needs.list-tests.outputs.test_files) }}
256+ include : ${{ fromJson(needs.list-tests.outputs.test_files) }}
235257
236258 steps :
237259 - uses : actions/checkout@v7
238260 with :
239261 ref : ${{ github.ref }}
240262 fetch-depth : 0
263+ lfs : true
241264
242265 - name : Download Docker Image
243- uses : actions/download-artifact@v5
266+ uses : actions/download-artifact@v8
244267 with :
245268 name : ${{ inputs.docker_image_artifact_name }}
246269
@@ -260,3 +283,4 @@ jobs:
260283 image_tag : ${{ inputs.docker_image_tag }}
261284 container_prefix : ${{ inputs.container_prefix }}
262285 job_index : ${{ strategy.job-index }}
286+ setup_venv : ${{ inputs.setup_venv }}
0 commit comments