3939 - id : supported-arch-matrix
4040 name : Generate Arch
4141 run : |
42- echo "arch=[\\\"amd64\\\",\\\"arm64\\\"]" >> $GITHUB_OUTPUT
42+ echo "arch=[\\\"amd64\\\"]" >> $GITHUB_OUTPUT
43+ # echo "arch=[\\\"amd64\\\",\\\"arm64\\\"]" >> $GITHUB_OUTPUT
4344 image-type-matrix :
4445 name : Create Image Type Matrix
4546 runs-on : ubuntu-22.04
@@ -191,7 +192,7 @@ jobs:
191192 - run : make ci-scan-vulnerability
192193 if : contains(matrix.image, 'alpine')
193194 test :
194- name : Testing "${{ matrix.image }}"
195+ name : Testing "${{ matrix.image }}" on "${{ matrix.arch }}"
195196 needs :
196197 - build
197198 - image-matrix
@@ -201,6 +202,8 @@ jobs:
201202 strategy :
202203 fail-fast : false
203204 matrix :
205+ arch :
206+ - linux/amd64
204207 image : ${{ fromJson(needs.image-matrix.outputs.image) }}
205208 exclude : ${{ fromJson(needs.exclude-matrix.outputs.exclude) }}
206209 steps :
@@ -212,11 +215,23 @@ jobs:
212215 name : docker-image-${{ matrix.image }}
213216 path : ./docker-image
214217 - run : ls -lasth ./docker-image/
218+ - run : printf "images=%s" $(awk '{printf("%s,",$0)} END { printf "\n" }' ./docker-image/image.tags) >> $GITHUB_OUTPUT
219+ id : images
215220 - run : docker load --input ./docker-image/image.tar
216- - run : |
221+ - run : docker image ls -a
222+ - name : Determine test suite
223+ id : test_suite
224+ run : |
217225 export IMAGE_BASE_VERSION=$(php -r 'echo explode("-", "${{ matrix.image }}")[2];')
218- (echo "${{ needs.supported-arch-matrix.outputs.arch }}" | jq -r '.[]') | xargs -I % make $(php -r 'echo "test-", explode("-", str_replace(["zts-zts", "cli-nts"], ["zts", "nts"], "${{ matrix.image }}"))[0];') IMAGE_ARCH=%
226+ printf "test_suite=%s" $( make $(php -r 'echo "test-", explode("-", str_replace(["zts-zts", "cli-nts"], ["zts", "nts"], "${{ matrix.image }}"))[0];') IMAGE_ARCH=${{ matrix.arch }}) >> $GITHUB_OUTPUT
219227 - run : rm -Rf ./docker-image/
228+ - uses : WyriHaximus/github-action-testinfra@main
229+ with :
230+ cmd : php
231+ image : " ${{ steps.images.outputs.images }}"
232+ flags : --platform="${{ matrix.arch }}"
233+ testsPath : test
234+ testSuite : " ${{ steps.test_suite.outputs.test_suite }}"
220235 check-mark :
221236 name : ✔️
222237 needs :
0 commit comments