2020 required : false
2121 default : " ghcr.io/restatedev/restate:main"
2222 type : string
23+ serviceImage :
24+ description : " service image, if provided it will skip building the image from sdk main branch"
25+ required : false
26+ default : " "
27+ type : string
2328 workflow_call :
2429 inputs :
2530 restateCommit :
3237 required : false
3338 default : " ghcr.io/restatedev/restate:main"
3439 type : string
40+ serviceImage :
41+ description : " service image, if provided it will skip building the image from sdk main branch"
42+ required : false
43+ default : " "
44+ type : string
3545
3646jobs :
3747 sdk-test-suite :
@@ -86,11 +96,15 @@ jobs:
8696 docker tag "${output#*: }" "localhost/restatedev/restate-commit-download:latest"
8797 docker image ls -a
8898
99+ # Either build the docker image from source
89100 - name : Set up QEMU
101+ if : ${{ inputs.serviceImage == '' }}
90102 uses : docker/setup-qemu-action@v3
91103 - name : Set up Docker Buildx
104+ if : ${{ inputs.serviceImage == '' }}
92105 uses : docker/setup-buildx-action@v3
93106 - name : Build Python test-services image
107+ if : ${{ inputs.serviceImage == '' }}
94108 id : build
95109 uses : docker/build-push-action@v6
96110 with :
@@ -102,11 +116,17 @@ jobs:
102116 cache-from : type=gha,scope=${{ github.workflow }}
103117 cache-to : type=gha,mode=max,scope=${{ github.workflow }}
104118
119+ # Or use the provided one
120+ - name : Pull test services image
121+ if : ${{ inputs.serviceImage != '' }}
122+ shell : bash
123+ run : docker pull ${{ inputs.serviceImage }}
124+
105125 - name : Run test tool
106126 uses : restatedev/sdk-test-suite@v3.2
107127 with :
108128 restateContainerImage : ${{ inputs.restateCommit != '' && 'localhost/restatedev/restate-commit-download:latest' || (inputs.restateImage != '' && inputs.restateImage || 'ghcr.io/restatedev/restate:main') }}
109- serviceContainerImage : " restatedev/test-services-python"
129+ serviceContainerImage : ${{ inputs.serviceImage != '' && inputs.serviceImage || ' restatedev/test-services-python' }}
110130 exclusionsFile : " test-services/exclusions.yaml"
111131 testArtifactOutput : " sdk-python-integration-test-report"
112132 serviceContainerEnvFile : " test-services/.env"
0 commit comments